News for hackers. Stuff that matters.
Re:Purely Functional Data Structures in Scala by taeric on Thursday September 19, 2013 @03:49PM (#6413807)
I think the question was more of how oddly this goes with the "multiple workers placing data on a queue" or the "multiple workers taking data off of a queue." In either of those cases, there will still have to be synchronization over the queue/dequeue logic such that a workers contribution is accounted for correctly.

The only use case for the persistent container I can think of is specifically when the container is being passed around by multiple threads. That is, if your concern is what is going into the container, then a mutable version likely has you covered rather well. If your concern is, instead, on passing around the collection, the persistent ones have an advantage in reasoning. (Though, again, the common case of a queue is to be manipulated...)

There are no comments on this comment yet.