On 2/21/08, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> hope you don't mind me asking for a bit more info, I was always under
>  the impressions that a thread is defined as (quote wiki)
>
>  "Threads are a way for a program to fork (or split) itself into two or
>  more simultaneously (or pseudo-simultaneously) running tasks. Threads
>  and processes differ from one operating system to another but, in
>  general, a thread is contained inside a process and different threads of
>  the same process share some resources while different processes do not."
>
>  and php supports pcntl_fork along with signal handlers and interprocess
>  communication via functions like or stream_socket_pair.
>
>  as such if I set up a cli app with parent and child processes
>  (?threads), then isn't this multithreading in php?
>
>  I know this strictly isn't the place for such questions, but I hope you
>  won't mind enlightening me a little on the matter.

it is not multithreading.
multithreading means that a process starts several "threads" which
work simulatenously and share local resources (such as variables,
dynamically created functions/classes, database connections, etc.)

pcntl_fork creates several processes, which can communicate, but still
has their own sets of local resources

-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to