On vie, 2012-05-11 at 09:56 -0500, Tim Caswell wrote:
> Please don't misunderstand me.
That's unavoidable, sadly :)
Ok, i'm a bit lost. How does an implicit coroutine suspension look like?
My tasks can relinquish control trough a bunch of calls, easily
spottable (sched.wait, sched.signal, sched.run, and some wrappers around
those). For example I have this helper function ("run on a signal")
--------------------------------------
M.sigrun = function ( f, waitd )
local wrapper = function()
while true do
f(M.wait(waitd))
end
end
return M.run( wrapper )
end
---------------------------------------
If the provided f doesn't explicitly yield (with a sched.signal or
something) it will run atomically. Or you mean, that I should *enforce*
that when used as this, f will not yield?
Jorge