On Mon, Jan 24, 2011 at 11:26 AM, Joshua Ballanco <jball...@gmail.com> wrote: > On Mon, Jan 24, 2011 at 12:15 PM, Charles Oliver Nutter > <head...@headius.com> wrote: >> >> Queue#apply is actually defined in gcd.c in MacRuby's code, so this >> would be a MacRuby bug. I'd have filed it, but I wasn't sure if I was >> missing something about MacRuby's Array and thread-safety. > > Yeah, probably a documentation bug...but only sorta. Parallel/Not-Parallel > will depend on the queue. Apply just queues the block asynchronously the > number of times indicated by the argument. How the block executes depends on > the queue.
Ok, that makes sense. The documentation implied that apply always runs the jobs in parallel, so I assumed that meant they could potentially run concurrently. If instead they're serial, the example as written should be safe. It seems like a poor example in any case, however, since someone might assume using a concurrent queue is safe as well. - Charlie _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel