[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua coroutine using
- From: Didro <gmdidro@...>
- Date: Mon, 27 Oct 2008 09:04:16 -0700 (PDT)
I work on laboratory equipment control system. In that system we use
Lua as tool for describing control sequences:
--set pin #12 to one state (5v), wait for signal on pin #10, reset pin #12
We need control many pins concurrently, so we use coroutines:
In other words, we use coroutines, because of concurrent waiting.
Up until now we've been working with small numbers of coroutines
(1...5) and all code that we need, we generate in such coroutines.
Now, we have to implement interpreter mode in our system and so
operator could send new commands *after* early created coroutines have
been run. So we have to create new coroutine for every new operator
command (because AFAIK we can't add Lua code to early created
The question - Is it normal to have 500...1000 coroutines in program ?
Don't that cause system resources leak ?
View this message in context: http://www.nabble.com/Lua-coroutine-using-tp20190751p20190751.html
Sent from the Lua - General mailing list archive at Nabble.com.