[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_newthread state and lua_pcall
- From: Doug Currie <doug.currie@...>
- Date: Sat, 20 Feb 2010 10:24:15 -0500
On Feb 20, 2010, at 5:35 AM, Roman Senuta wrote:
> Is it safe to use lua_pcall with non main thread context? Here is the sample code:
> lua_State* L1 = lua_newthread(L);
> ...
> lua_getglobal(L1, "foo");
> lua_pcall(L1, 0, 0, 0);
>
> Or functions can be executed within created threads only by using lua_resume?
It is safe, with some caveats of course. I asked a similar question recently; see:
http://lua-users.org/lists/lua-l/2010-02/msg00527.html
e