My favorites | Sign in
Project Logo
                
People details
Project owners:
  killerwhile

Multithreaded Daemon

MultiThreaded Daemon (MTD) is a kind of framework written in PHP5 that provide simple procedures to run background tasks in a multithreaded environnement.

Juste to be clear, I talk about multithreading in PHP but concurrent process should be more appropriate terms, because of the fork function used.

More precisely the framework is an abstract class that contains two abstract functions :

and lots of others functions which deal with the inter-process synchronization.

getNext($slot)

This function will return the next element to process, or null if there is currently no job and the daemon should wait.

run($next, $slot)

This second function is run in a separated thread (after forking) and take as argument the element to process (given by getNext).

Both function get an additionnal parameter slot which indicates where the thread will be executed

Stable release

2007-09-20 : multithreaded daemon v.0.1









Hosted by Google Code