lua-users home
lua-l archive

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


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).


--
// David Morris-Oliveros
// Camera & Lua Coder
// Team Bondi


------------------------------------------------------------------------
Contact:
Team Bondi Pty Ltd
Level 2, 608 Harris Street
Ultimo, NSW 2007
Australia
Tel: +61 (0)2 8218 1500
Fax: +61 (0)2 8218 1507
Web: http://www.teambondi.com
------------------------------------------------------------------------
This email may contain confidential information.  If you are not
the intended recipient, you may not copy or deliver this message to
anyone. In such case, you should destroy this message and kindly
notify the sender by reply email. Opinions, conclusions and other
information in this message that do not relate to the official business
of our firm shall be understood as neither given nor endorsed by it.
------------------------------------------------------------------------