Re: Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

From: Date: Tue, 02 Sep 2008 03:32:02 +0000
Subject: Re: Shared memory, mutex functionality and spawning threads. Is it possible using PHP?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-279244@lists.php.net to get a copy of this message
http://us2.php.net/apc Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Kent Larsson wrote: > Hi, > > Is it possible to have shared memory in the form of shared global variables > in PHP? Or any other form of shared memory? And if that is the case, is > there any form of mutex functionality which may be used to assure > syncronized access to this memory? > > My next question is related to the first one. > > Is it possible to have a thread running for processing of information. This > thread should be accessed from all the session instances, and it would also > need to be syncronized. I would like to have something like: > jobProcessorThread.addJob(aJobClassInstance) > > The job processor thread should work with the jobs in its queue until the > queue is empty. Then it should idle until more requests are received. > > And my last question. > > Is it possible to let any code run and perform its work after PHP has sent > the page to the user? This could be an alternative to having a worker thread > in if it's also possible to have mutexes and shared memory. Then the worker > thread jobs could be processed after a page has been sent inside a critical > block protected by mutex functionality. > > Best regards, > Kent > >

« previous php.general (#279244) next »