Thanks for answering.

OK, so including Enumerable is a bad idea.
But #<< would still be nice.

Regards

2008/11/10 Joel VanderWerf <vjoel / path.berkeley.edu>:
> Yukihiro Matsumoto wrote:
>>
>> Hi,
>>
>> In message "Re: [ruby-core:19760] ThreadGroup: << and Enumerable for POLS"
>>    on Mon, 10 Nov 2008 07:49:22 +0900, paddor <paddor / gmail.com> writes:
>>
>> |The ThreadGroup class in Ruby has some containing functionalities. It
>> |allows you to iterate through it's members.
>> |Wouldn't it be nice if it includes the Enumerable module?
>>
>> I am negative.  ThreadGroup do not have any iterating method.  Just
>> #list to return list of threads.  I don't think it's worth including
>> Enumerable module and adding iterating method.
>
> It would lead to race conditions, wouldn't it?
>
> The construct
>
>  th_grp.list.each {...}
>
> makes it explicit that you are iterating over threads that *were* in the
> group when #list was called.
>
> --
>      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
>
>



-- 
paddor