lua-users home
lua-l archive

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


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
function F()
  while(vipins:GetPinInStatus(10)==false) do

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 ?

Thank you,
Petrov Alexander

View this message in context:
Sent from the Lua - General mailing list archive at