lua-users home
lua-l archive

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

gary ng wrote:
> Can't I just use COPAS and non-blocking io on
> stdin/stdout(i.e. fh 0/1) ? As it seems to me it is no
> different than a program launched by tcpserver ?
> That is, I have two handler in COPAS, one is the
> writer(on 1), the other the reader(on 0). I can write
> until it blocks and if the sub-process have enough to
> work on(some kind of filter) would trigger my reader
> on next select() ?

I don't know COPAS but as I understand it, it should
work fine.  It's the two-process-method implemented
with coroutines and select.  The coroutines are used
to create userspace non-preemptive threads and select
is used by the scheduler to wake up the right thread.

Ciao, ET.