lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, May 10, 2012 at 10:50 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
if a person wishes to actually do some heavy computation, they need to understand that they must let the system do some work, with a sleep(0)

In practice, we've found it to be a non-issue for network and I/O oriented applicative code. We've got a dedicated "sched.wait()" API to force a reschedule, but we never have to use it. We had to tweak os.execute(), Lua sockets and a couple of similar core functions so that they either yield or run in a separate process, though.

I think it will remain a non-issue in Lua: heavy computations tend to occur in C, not in Lua.