lua-users home
lua-l archive

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


On Fri, Sep 16, 2005 at 02:19:33PM +1000, David Morris-Oliveros wrote:
> Yes, lua_newthread creates a coroutine with a new (sub) lua_State. You 
> then start it with lua_resume(). It won't block other coroutines, since 
> you have to timeslice them anyway manually.
> 
> Does this make sense?
> 
> Edwin Eyan Moragas wrote:
> 
> >Hi guys,
> >
> >does lua_newthread create a new thread (OS thread)
> >or does it create a coroutine pushed to the existing
> >lua state?
> >
> >what i'm trying to find out is if this new lua thread
> >created by lua_newthread will block other
> >existing lua threads (ie, coroutines).

in other words:
no, it does not create an OS thread, and
yes, a blocking operation in any coroutine
blocks the whole process :)