lua-users home
lua-l archive

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


Rici said:

"The main purpose of running multiple (Lua) threads in multiple (OS)
threads would be to allow the threads to communicate..."

Lets turn this around.  What is the main purpose of running multiple (Lua)
threads in an OS single-threaded environment?

The only reason I can think - is perhaps you want to have duplicate variable
contexts.  I mean, maybe you have a single lua script used to control
multiple instances of a helicopter.

And perhaps a corollary is this: the main purpose of coroutines in a OS
single-threaded environment, is if you need the appearance of concurrency
**AND** you don't need "a single lua script used to control multiple
instances of a helicopter".

Is this correct?

-Brent