Thanks for looking at this.

It's the call to contains() call to purgeReferences() that I didn't want
happening while in the publish() loop. This has the 'feel' of slowing
publish() down, especially as its looping around a 'unknown' sized queue'.
As it the jira ticket we never came up with a brilliant method name. maybe
contentExists()  would be better?



On 12 May 2014 15:40, Adriaan Moors <notifications@github.com> wrote:

> In src/main/scala/scala/swing/Publisher.scala:
>
> > @@ -168,6 +168,7 @@ private[swing] abstract class RefSet[A <: AnyRef] extends mutable.Set[A] with Si
> >    def -=(el: A): this.type = { underlying -= Ref(el); purgeReferences(); this }
> >    def +=(el: A): this.type = { purgeReferences(); underlying += Ref(el); this }
> >    def contains(el: A): Boolean = { purgeReferences(); underlying.contains(Ref(el)) }
> > +  def containsExists(el: A): Boolean = {  underlying.contains(Ref(el)) }
>
> What does the Exists suffix mean? Would it make sense to use this method
> in contains's body?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scala/scala-swing/pull/9/files#r12532196>
> .
>