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