[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1 vs LuaJIT: pcall behavior differs
- From: Mike Pall <mikelu-1108@...>
- Date: Fri, 19 Aug 2011 11:21:38 +0200
Arseny Vakhrushev wrote:
> Is pcall() in LuaJIT yieldable or am I missing something?
http://luajit.org/extensions.html#resumable
> $ luajit-2.0.0-beta8 -e 'assert(pcall(function () coroutine.yield() end))'
> luajit-2.0.0-beta8: (command line):1: (command line):1: attempt to yield across C-call boundary
> stack traceback:
> [C]: in function 'assert'
> (command line):1: in main chunk
> [C]: ?
>
> ... don't work of course, but it seems that the C-call boundary here isn't 'pcall' itself but the main call of the '-e' chunk.
Sure. And there's no coroutine, of course. The error message is
kept for compatibility.
--Mike