Richard Lynch wrote:

> Process forking has EVERYTHING to do with thread safety.
> Whatever is going to go wrong in a threaded environment is going to
> also go wrong when you fork the process, almost for sure.

Forking a process and creating a thread are really two very different
concepts (from a programming pov).

In a threaded environment you often have e.g. semaphores and mutexes to
coordinate access to shared data.  When you've forked a process, you
share data over IPC or similar. 
When you create a new thread, it has access to global scope variables in
the main tread.  It has access to shared heap storage.  None of this
applies to a forked process. 


/Per Jessen, Zürich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to