Re: Pre-emptive round robin scheduler around Lua VM
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Pre-emptive round robin scheduler around Lua VM
- From: Thomas Jericke <tjericke@...>
- Date: 2014年4月01日 12:39:43 +0000
On 04/01/2014 12:15 PM, Dominique
Torette wrote:
[
http://www.lua.org/wshop13/Jericke.pdf).
The solution
explained starting from page 18 is close to what I tried
(yield from a count debug hook).
But I’m not
confident in such solution when your Lua programs also work
with coroutines.
My idea is to
suppress the coroutines support.
Thanks,
Dominique Torette.
Yes this is true, you may not load the coroutines standard library
to the interpreter. I certainly don't do that (and I also don't load
the debug library either). Instead you may write your own API for
the user to spawn coroutines and later synchronize them again.
I also introduced such things as mutex and sepmaphore, as they are
needed as soon as you have pre-emption.
--
Thomas