[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to know if can I execute a yield
- From: Thierry FOURNIER <tfournier@...>
- Date: Fri, 6 Mar 2015 12:00:25 +0100
Hello,
I try to implement an execution timeout controller and a forced yield
to improve reactivity of my scheduler. I use the debug hook with an
instruction counter. In my hook function I try to run a yield.
This is useful to executing a forced yield and give the hand to my
main scheduler. This permits than a quite long Lua code doesn't block
my event driven process.
Sometimes the execution state is not yieldable. I sew the Lua code, and
this information seems to be contained in the "nny" variable. The C api
cannot give me the access to this variable.
It have a mean from the C api to know if I can execute a yield ?
Thank
Thierry