[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Idea for an event loop library
- From: Fabien <fleutot+lua@...>
- Date: Thu, 10 May 2012 13:45:04 +0200
On Thu, May 10, 2012 at 10:50 AM, steve donovan <firstname.lastname@example.org> 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.