Re: embed sapi module and multi-threading
| From: | Bas van Beek | Date: | Thu, 12 Mar 2009 20:26:10 +0000 |
| Subject: | Re: embed sapi module and multi-threading | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43334@lists.php.net to get a copy of this message | ||
No problem. I will clean up the code to remove non generic items and will post a link for code inspection shortly.
Bas
Op 12 mrt 2009, om 21:04 heeft Marcus Boerger het volgende geschreven:
Hello Bas, I would assume that we will see more people wanting this in the future. So if you're willing to provide your code under PHP License, maintain it in the foreseeable future and provide a clean version of it (as in free from anything that is not really necessary), then you should show us a patch. And if it looks fine you should go for an account. marcus Thursday, March 12, 2009, 5:25:32 PM, you wrote:Hi,For a project of mine I had to have an embedded webserver with php support. For this I've used the boost::asio multi-threaded example as a base and modified it so I could enable php scripting support. The first, logical and fast thing to do was to try out the embed sapi module but I found it to hang on concurrent php_embed_init calls.The biggest issue I found was that the embedded module bundles sapi module startup and request startup. I ended up writing my own SAPI module as I also needed full support for POST methods, URL queries, etc. but I can imagine people being interested in having an embedded sapi which separates module startup/shutdown and request startup/ shutdown so concurrency works together with being able to have separate request environments for each thread.Separating these calls would allow for the following:At program startup initialize the php environment At each thread startup initialize a php request environmentWith a few minor alterations I could convert my specific sapi module or current embed module to a generic embed-mt multithread capable module.Would this be something that you are interested in?kind regards,Bas van BeekBest regards, Marcus --PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php