Is dequeueAll on mutable.SynchronizedQueue thread-safe?

concurrency, scala, thread-safety

Solution

You mean this dequeueAll?

override def dequeueAll(p: A => Boolean): Seq[A] = synchronized { super.dequeueAll(p) }

You can click "blame" on github where the helpful comment shows the ticket. Click it or ticket.

Problem

Looking at the source code of SynchronizedQueue.scala, it looks like dequeueAll is not overriden ? Is this a bug ?

Original source