request for comments on threadsafe / multi-thread enabled Embed2 SAPI
| From: | Bas van Beek | Date: | Thu, 26 Mar 2009 19:35:44 +0000 |
| Subject: | request for comments on threadsafe / multi-thread enabled Embed2 SAPI | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-43499@lists.php.net to get a copy of this message | ||
Hi Guys,
The Embed2 SAPI for embedded applications needing multi-thread enabled PHP scripting support can be inspected from the following repository:
http://svn.tobin.nl/public/php/embed2/trunk/
The original Embedded SAPI does not allow concurrent script runs and as such is less suited for multi-threaded applications . Also single threaded applications
can benefit from the Embed2 SAPI as for each PHP script run, it is not necessary to initialize and shutdown the entire PHP environment.
Examples for embedding PHP using the Embed2 SAPI can be found in the examples directory.
The C example uses pthreads to showcase a typical posix implementation.
The C++ example uses the boost::thread library to showcase a cross platform implementation. Build instructions / make files are also added for Linux, OS X and Windows
If good enough I would like to donate the Embed2 SAPI to the PHP community using the standard PHP License and request a CVS account for adding it to the source tree.
The code has been tested to run on PHP-5.2.9 and PHP-5.3.0RC1 and was tested using Mac OS X, Debian Linux and Windows XP.
kind regards,
Bas van Beek