Thread 1.0

Wrapper around the pcntl_fork() stuff, with a API set like Java language. Practical usage is done by extending this class, and re-defining the run() method. This way PHP developers can enclose logic into a class that extends PHP_Fork, then execute the start() method that forks a child process.

Communications with the forked process is ensured by using a Shared Memory Segment; by using a user-defined signal and this shared memory developers can access to child process methods that returns a serializable variable.

The shared variable space can be accessed with the tho methods:
- void setVariable($name, $value)
- mixed getVariable($name)
  $name must be a valid PHP variable name;
  $value must be a variable or a serializable object.

Resources (db connections, streams, etc.) cannot be serialized and so they're not correctly handled.

Only runs on *NIX systems, because Windows lacks of the needed pcntl ext.

License type: PHP - The PHP License
Date added: 7 years, 6 months 17 days ago | Last updated: 7 years, 6 months 17 days ago

More popular Utilities & Tools

This is actually one of the most advanced image hosting script. The imagetize key features: SEO, Ads Ready, Admin

Listing Files

  • 1.1 KB
  • 09/23/2008 07:03:50
Hot Scripts