Eric Wong <normalperson / yhbt.net> wrote:
> benoit / sqreen.io wrote:
> > That seem to have fixed it! Newbie question, do you plan to backport it to 2.5.x series also ?
> 
> Thanks for the confirmation.  I'm not too happy about the memory
> increase for such objects; but I will work on that next month.
> 
> naruse handles the backporting for 2.5 branch.

I guess we missed the merge window for 2.5.1

Fwiw, I consider doing fork after creating threads to be
dangerous and bug-prone in any language.  AFAIK, pthreads
implementations do not support it, even.

Ruby currently can support this because of GVL; but I'm not sure
how well we can support this pattern in the future.

Just to reiterate:

	Thread.new; fork;	 # unsafe
	fork; Thread.new;	 # safe

For the fork+exec case, we use vfork+exec via Process.spawn to
ensure `backtick` and system() work inside Threads.  (Similarly,
POSIX has posix_spawn(3)).

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>