From: Kent Sibilev Date: 2006-09-05T03:52:36+09:00 Subject: Re: The real difference between Mutex and Sync On 9/4/06, Kent Sibilev wrote: > On 9/4/06, khaines@enigo.com wrote: > > > > array.c's behavior is what needs to be examined in greater detail, here. > > Mutex, itself, is not doing anything surprising. > > > > > > Kirk Haines > > > > Good findings. > > I think the problem lies in the Array#shift (rb_ary_shift) > implementation. Basically, it just increments the internal pointer and > it never modifies the size of an array. This means that if you have an > array with 1000 elements and you 'shift' it 999 times, all these > elements are still visible to the garbage collector, until you modify > this array by triggering rb_ary_store method, for example. > I meant that rb_ary_shift never modifies the size of allocated memory. -- Kent --- http://www.datanoise.com