Re: Can I fork a PHP thread?

From: Date: Wed, 17 Jan 2001 18:12:09 +0000
Subject: Re: Can I fork a PHP thread?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35092@lists.php.net to get a copy of this message
Im nearly posative this isnt what your looking for, but I thought I would see if maybe it was :) compile php as a cgi so you can run it from the command prompt. then just run the php file from the command prompt through exec () <? exec("php -q somephpfile.php &"); ?> untested of course. Chris Lee Mediawaveonline.com "Dylan McNamee" <dylan@truedisk.com> wrote in message news:3A65D284.505B30E8@truedisk.com... > There are occasions when I'd like to execute some long-running task > in the background, in response to some user action. It seems that > PHP has all the neccesary mechanisms to allow me to do this, but > in my perusing of the manuals/FAQ's/digests, etc, I don't see such > a facility. > > For example, I'd like to do something like this: > > function long_running_background_task() > { > ... > } > > function handle_some_action() > { > ... > fork (long_running_background_task); > } > > In the cases I'd like to do this, I can manage synchronization > externally... > (i.e., implement join by waiting for a /tmp file to appear or > something), > so I'm not asking for a join, or any sychronization facilities. > > Does anyone agree that this would be useful? Is there another way to > accomplish this? Better yet, does this function already exist, but has > managed to hide for all this time...? > > thanks, > dylan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#35092) next »