From: Wilson Bilkovich Date: 2007-01-19T06:17:33+09:00 Subject: Re: [BLOG] Concurrency models On 1/18/07, gwtmp01@mac.com wrote: > > On Jan 18, 2007, at 1:07 PM, Wilson Bilkovich wrote: > > On 1/18/07, gwtmp01@mac.com wrote: > >> Does this mean that there is already an implicit understanding > >> that some > >> methods in the core Ruby classes are inherently thread safe? If so > >> are > >> *all* core methods thread safe? Is that by design or accident? I > >> doubt > >> that the entire standard library is thread safe but perhaps large > >> parts are? > > > > They definitely are not. Given that fine-grained locks in library code > > do not compose, it's going to take some work to make the whole stdlib > > thread-safe once native threads are available. > > What does 'They' refer to in your comment? The core classes or the > standard > library? Are there non-thread safe methods in the core classes? I was > trying to distinguish between the two groups of classes in my comment. > I meant the stdlib. The core classes are largely written in C, and wrapped by various locks (the pieces I have examined, at least). I'm not claiming the whole stdlib is a farrago of non-thread-safety. Just that it definitely isn't intended to be a thread-safe toolkit, and will need attention Before We Are Done.