lua-users home
lua-l archive

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

David Given wrote:

The problem was that my coroutine top-level function runs everything inside a pcall, so it can trap errors. And pcall, despite being a pure Lua function, apparently counts as a C call and you can't yield across it. Ack.

If you are running functions by resuming coroutines, do you need pcall ?
Lua errors, asserts, etc within the coro should all just abort the coroutine and return to caller (resumer).