[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Coroutines [was: snapshot of Lua 4.1 (work)]
- From: Edgar Toernig <froese@...>
- Date: Fri, 11 May 2001 19:14:19 +0200
"J. Perkins" wrote:
>
> I don't think C-level coroutine support is a good idea, myself. Programs
> that need it should (IMO of course) use a separate C library.
That's why they only made the lua_newthread function. Lua itself will
only support having multiple threads. Basically it's nothing real new.
The difference between multiple threads created by lua_open and
lua_newthread is only that the newthread ones share the same global
state.
How you use this new function is up to you. You can use your favorite C
library to implement coroutines (unfortunately there's no standard lib) or
preemptive threads or even something completely different. You choice...
Ciao, ET.