Re: [MacRuby-devel] thread-safety and collections in macruby

2011-10-18 Thread Terry Moore
If you're not wring/changing the array no problems. But to be safe use Object#freeze... Terry Moore On 19/10/2011, at 6:26 PM, Michael Johnston wrote: > Note, in my example I can also guarantee that none of the elements in b are > going to be changed (for example, an array of strings) > Cheer

Re: [MacRuby-devel] thread-safety and collections in macruby

2011-10-18 Thread Michael Johnston
Note, in my example I can also guarantee that none of the elements in b are going to be changed (for example, an array of strings) Cheerio, Michael Johnston lastobe...@mac.com On 2011-10-18, at 10:17 PM, Michael Johnston wrote: > In ObjC, the immutable collections are threadsafe. > > In mac

[MacRuby-devel] thread-safety and collections in macruby

2011-10-18 Thread Michael Johnston
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 t

Re: [MacRuby-devel] MacRuby and ARC was: Advice for Total Tyro

2011-10-18 Thread Perry E. Metzger
On Tue, 18 Oct 2011 10:04:37 +0200 Laurent Sansonetti wrote: > Hi Perry, > > On Tue, Oct 18, 2011 at 12:07 AM, Perry E. Metzger > wrote: > > On Mon, 17 Oct 2011 13:44:56 -0700 Matt Aimonetti > > wrote: > >> See my earlier reply, basically, you are right, it is technically > >> possible to chang

Re: [MacRuby-devel] MacRuby and ARC was: Advice for Total Tyro

2011-10-18 Thread Laurent Sansonetti
Hi Perry, On Tue, Oct 18, 2011 at 12:07 AM, Perry E. Metzger wrote: > On Mon, 17 Oct 2011 13:44:56 -0700 Matt Aimonetti > wrote: >> See my earlier reply, basically, you are right, it is technically >> possible to change the way MacRuby works to use an automatic >> reference counting approach. >>