lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I think the problem is that pcall is relatively special compared to the rest
of the library in that it provides flow control and in fact more or less has
to be used for certain pieces of flow control. In other words, it's
functionality is essential enough to the use of Lua that it feels more like
part of the language than part of a C library.

The work around is to use something like coxpcall which uses coroutines to
simulate pcall semantics.


on 2/16/06 3:35 AM, Luiz Henrique de Figueiredo at

>> pcall looks like pure Lua, and therefore I assumed that you could
>> yield across it.
> Does pcall really look like pure Lua? Lua is like C in this respect: it
> has NO builtin functions. So, all functions provided by the standard Lua
> library are C functions. --lhf