summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2007-05-27 13:20:20 +0000
committerpixel <pixel>2007-05-27 13:20:20 +0000
commit8cd6e24342a7cd209055eef42907ecc10843e466 (patch)
treee68a644df8058ec9f262f895c370ec4a98dd1f4a
parent8811b94663391afe87eb4a88b459400647b47d2c (diff)
Spawning threads for each call to a LuaDomain.
-rw-r--r--lib/LuaHttp.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/LuaHttp.cc b/lib/LuaHttp.cc
index 993b7a1..8d24416 100644
--- a/lib/LuaHttp.cc
+++ b/lib/LuaHttp.cc
@@ -204,6 +204,10 @@ class LuaDomain : public Domain {
}
virtual void Do(const HttpRequest & req, HttpResponse * res) throw (GeneralException) {
int i;
+
+ Lua * oldL = L;
+ Lua * L = oldL->thread(false);
+ oldL->pop();
L->push(DOMAIN_REGISTRY);
L->gettable(LUA_REGISTRYINDEX);