opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
415 stars 150 forks source link

Implement event handler threads #6

Open hampusborgos opened 12 years ago

hampusborgos commented 12 years ago

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.