You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Philipp Janda edited this page Apr 21, 2015
·
1 revision
coroutine.running
For PUC-Rio Lua 5.1 the (x)pcall functions use internal coroutines to
allow yielding. The compatibility implementations of debug.traceback
and coroutine.running take that into account, but if you use the
compatibility versions of (x)pcall to execute a function that uses
the original versions (e.g. via an upvalue), there could be problems.
In the case of debug.traceback the stack trace will be incomplete,
but in the case of coroutine.running the wrong coroutine (the one
started by (x)pcall) is reported! To mitigate that risk load the
compat53 Lua module before all other modules, so that those cannot
keep a reference to the original 5.1 functions.