Right now, every event spawns a new lua coroutine, which is then immediately destroyed if the handler does not call wait / listen or similar.
This is not ideal. A better solution would be to implement event-handler threads so that coroutines are reused. This would also make it possible to implement LuaJIT support.
Right now, every event spawns a new lua coroutine, which is then immediately destroyed if the handler does not call wait / listen or similar.
This is not ideal. A better solution would be to implement event-handler threads so that coroutines are reused. This would also make it possible to implement LuaJIT support.