[MacRuby-devel] thread-safety and collections in macruby
Michael Johnston
lastobelus at mac.com
Tue Oct 18 22:17:43 PDT 2011
In ObjC, the immutable collections are threadsafe.
In macruby, are collections threadsafe to read only?
ie, if I do this:
a = [ ...] # an array that may or may not be changed
b = a.dup # nowhere in the code is b ever used to add/delete/change an element
is b thread-safe to read from multiple threads (queued operations/blocks)?
also, is there any difference between doing
b = a.dup
and
b = NSArray.arrayWithArray(a)
Both result in class Array, so I assume there is no difference.
Cheerio,
Michael Johnston
lastobelus at mac.com
More information about the MacRuby-devel
mailing list