lua-users home
lua-l archive

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

When/if the green threads becomes a true possibility in Lua, would it mean that the code run within them is not allowed to touch the 'coroutine.*' features itself?

This is perfectly okay in my understanding, just want to ask.

I'd see green threads being the way to make Lanes spawn even more threads, without using up the OS level "real" threads pool.


Ivan Gagis kirjoitti 31.7.2008 kello 18:22:

Hi Javier,

green threads are used extensively in Java VMs for embedded systems, majority of Java VMs for mobile phones use green threads.

Currently, lua offers coroutines for systems where using the OS threads is undesirable. Green threads would be a good alternative to coroutines.


2008/7/31 Javier Guerra <>
On Thu, Jul 31, 2008 at 5:07 AM, Ivan Gagis <> wrote:
> Hi All,
> I saw some discussion about different implementations of threads in lua, but
> no one talked about green threads.
> In my opinion introducing the green treads would be a very good alternative > to all implementations of threads (with native OS threads) existing at the
> moment and coroutines.

does green threads offer any hard advantage on modern systems? most
java VMs have migrated away from them...

(i know, Erlang and friends do that; but i think their architecture
offers special benefits from greeness that wouldn't transfer to Lua)