[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua suspend, continue, stop
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 26 Dec 1997 11:43:28 -0200
> But what seems to be missing is a way for me to tell Lua to suspend and
> later to continue or stop execution. [...]
>
> Is there an API for this that I missed?
No. This problem is related to multi-threading in Lua. The point here is that,
when Lua calls a function (a Lua function), the interpreter calls itself
recursively. So, when you get a break-point there is a lot of C stack behind
you, not only Lua stack, and the only way to have a "suspend, continue, stop"
feature is having this in C, too. Some people have changed the interpreter to
avoid this recursive structure, but this is not a trivial task, and does not
work for all cases (for instance, "dostring" and "dofile" must call the
interpreter again...).
-- Roberto