lua-users home
lua-l archive

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

Yeah, actually, it will make things quite easier. But, out of curiosity, how would i tell the coroutines to use independant envs?

Ben Sunshine-Hill wrote:

On 8/10/05, David Morris-Oliveros <> wrote:
So i guess it that both coroutines share the environment where 'i' is
stored, or am i doing something wrong when i'm newing the coroutines?

That's correct. Coroutines share the same environment, until you tell
them not to. Personally, I prefer this behavior; just use local
variables for coroutine-specific state.


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

Team Bondi Pty Ltd
Level 2, 608 Harris Street
Ultimo, NSW 2007
Tel: +61 (0)2 8218 1500
Fax: +61 (0)2 8218 1507
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.