![]() |
process and thread
hi,
I am novice in PHP, I have gotten a question. Can we use process or thread in PHP? Does it get anything with OS? If we can, which function or class can be used? thanks a lot! Your reply will be appreciated. |
Sorry, I don't think I understand this question. Could you please elaborate?
|
PHP has no native multi-threading support, however we can fork child processes.
http://uk2.php.net/pcntl |
I had an inkling that's what he meant, but he mentioned he was a novice. Forking to me is an advanced topic.
|
Yeah you can really get into a lot of trouble with forking and loops if you're not careful...
|
I am sorry.
My question is could we use signal, shared memory...(as used in C) in PHP? If I was in windows, is the any problem? |
Quote:
users don't have any control over memory management other than cleraring out variables and objects at the end of scripts...but even that is done automatically.... |
Hi Allworknoplay,
thank you for you reply. you are absolutely right, PHP do not have right to control memory. Actually, signal, shared memory was used to send message between threads in C. So my question is that "If I want to use thread in PHP, what function should I use? what will be used to send message between threads in PHP?" |
PHP does have the ability to play around with shared memory which may or may not be useful for you.
|
Thank you, Salathe, it is useful for me.
So if I want to be advanced in PHP, I should use linux instead of windows! |
Quote:
|
| All times are GMT. The time now is 03:21 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0