Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43499 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61502 invoked from network); 26 Mar 2009 19:36:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Mar 2009 19:36:02 -0000 Authentication-Results: pb1.pair.com header.from=bas@tobin.nl; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bas@tobin.nl; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tobin.nl designates 208.97.132.207 as permitted sender) X-PHP-List-Original-Sender: bas@tobin.nl X-Host-Fingerprint: 208.97.132.207 caiajhbdccah.dreamhost.com Received: from [208.97.132.207] ([208.97.132.207:42605] helo=spunkymail-a16.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/0F-30978-C19DBC94 for ; Thu, 26 Mar 2009 14:35:59 -0500 Received: from [192.168.1.100] (82-171-84-74.ip.telfort.nl [82.171.84.74]) by spunkymail-a16.g.dreamhost.com (Postfix) with ESMTP id 7C4C57B37E for ; Thu, 26 Mar 2009 12:35:47 -0700 (PDT) Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=Apple-Mail-6--56576265 Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 26 Mar 2009 20:35:44 +0100 X-Mailer: Apple Mail (2.930.3) Subject: request for comments on threadsafe / multi-thread enabled Embed2 SAPI From: bas@tobin.nl (Bas van Beek) --Apple-Mail-6--56576265 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 --Apple-Mail-6--56576265--