[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ruby lacks atfork : The evil that lives in fork...

Brian Candler

10/6/2008 5:15:00 PM

John Carter wrote:
> From the fork man page...
>
> * The child process is created with a single thread â?? the one
> that called fork().

That manpage is talking about OS threads, not Ruby threads.

If you want to know how Ruby handles its green threads through fork, you
need to refer to "ri Process::fork" instead.

According to ri, when (Ruby's) fork is called only the currently-running
(Ruby) thread continues to live in the child process.

> The entire virtual address space of
> the parent is replicated in the child, including the states
> of mutexes, condition variables, and other pthreads objects;

This is talking about OS mutexes etc. Again, the Ruby objects with
corresponding names are entirely different.
--
Posted via http://www.ruby-....