lua-users home
lua-l archive

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


Each coroutine has its own state, as each execution stack is tied to a state. The difference is that coroutines' states share some structures with their parent states. Debug hooks also aren't shared, for example.
 
--
Fabio Mascarenhas

On Feb 3, 2008 3:57 PM, Mark Meijer <meijer78@gmail.com> wrote:
On 02/02/2008, Stephen Kellett <lua@objmedia.demon.co.uk> wrote:
> I'm guessing the instruction table is small, could you have the
> instruction table per-state? Maybe only copy per-state when modified, so
> you'd start with one shared table. Or does this fail because some people
> like to have millions of lua states available at once for use with
> coroutines?

FWIW, my little coroutine experiment involves only a single Lua state.