>That's the topic recently discussed on ruby-list and ruby-dev ---
>MLs in Japanese.  Currently all threads are duplicated on fork, and it
>sometimes causes a problem.  However kill all threads but which issued
>fork may break some library or applications.
>
>There is a somewhat reasonable proposal posted by matz.
>
>  1. Add an argument indicates whether the thread will be killed or
>     not to Thread.new.
>  2. That argument indicates `kill the thread' in default.
>
>  # eg. something like Thread.new(kill_on_fork = true).
>
>And comments, request, claim, or something else are wanted.
>
>Your proposal may be included in future Ruby standard :-)

Not knowing much about threads or forks, I would humbly suggest the possibility of turning it around. It seems to me that at the point that I fork is when I would know whether I want to bring my threads along or not. I might be forking some totally detached task.

So my suggestion would be that fork would take a parameter indicating whether to bring all threads along, or none. Seems simple.

Kevin