Hello,

On 06/27/2004 05:31 PM, [EMAIL PROTECTED] wrote:
Is it possible to pcntl_fork() withing a class?

Basically I want a web page to load, and when the class is called in the
page, it can fork and the child can run, allowing the webpage to finish,
but the class process can continue 'till it's done.

Is this possible? Would I put the fork in the constructor? Would calling
the class methods after it forked work the same way?

You can fork processes from anywhere in your scripts including from classes as you may see in this class. I just doubt that you the forked processes outlive the current request.


Class: Thread
http://www.phpclasses.org/php_fork


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

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



Reply via email to