lua-users home
lua-l archive

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




On Sun, Jul 17, 2011 at 9:29 PM, Javier Guerra Giraldez <javier@guerrag.com> wrote:
On Sun, Jul 17, 2011 at 12:21 PM, Gaspard Bucher <gaspard@teti.ch> wrote:
> Thanks for the feedback. I looked at HTT and it looks really nice, but I
> have the feeling that I don't understand the benefit of a single event loop.
> I know that this is the common way to implement my event based architecture,
> but I don't understand why: it requires more complicated code, events
> starting in one place and finishing in another, data copying, queues,
> mutexes or complicated atomic code (for the event posting queue) and
> integrates badly with OS IO, interrupts and such....

you have it backwards:  all these you mention is needed for
multithreaded code, not for single-thread, or coroutines

--
Javier


Florian and Javier, thanks a lot for this discussion: I feel reassured regarding the current multi-threading choice in Lubyk. My model is multi-threaded but not concurrent hence the single "processing" occuring at a given time (implemented as a Lua state with a mutex).

To other members of this high-quality list: thanks for tolerating less competent people like me.


                                                               Gaspard