fix lua_nexus_sleep to use EV_TIMEOUT + misc lua-threads
authorTero Marttila <terom@fixme.fi>
Thu, 21 May 2009 16:23:50 +0300
branchlua-threads
changeset 207 3fa22abb5421
parent 206 47837a6bbbea
child 208 4c834d48e602
fix lua_nexus_sleep to use EV_TIMEOUT + misc
src/lua_objs.c
src/nexus_lua.c
--- a/src/lua_objs.c	Thu May 21 16:23:27 2009 +0300
+++ b/src/lua_objs.c	Thu May 21 16:23:50 2009 +0300
@@ -369,7 +369,7 @@
     
     // schedule wakeup
     // use a pure-timeout event
-    if (event_base_once(lua_nexus->nexus->ev_base, -1, 0, lua_nexus_sleep_wakeup, L, &tv))
+    if (event_base_once(lua_nexus->nexus->ev_base, -1, EV_TIMEOUT, lua_nexus_sleep_wakeup, L, &tv))
         return luaL_error(L, "event_base_once");
 
     // yield
--- a/src/nexus_lua.c	Thu May 21 16:23:27 2009 +0300
+++ b/src/nexus_lua.c	Thu May 21 16:23:50 2009 +0300
@@ -101,6 +101,7 @@
 
 err_t nexus_lua_error (lua_State *L, int ret, struct error_info *err)
 {
+    // XXX: this can raise an erorr itself
     const char *error = lua_tostring(L, -1);
 
     switch (ret) {