Very simple preemptive scheduler for Lua