lua-users home
lua-l archive

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


Here's a general question. Many Lua libraries define their own "master
loop" that waits for events and processes them.

Verse does this, IupLua does it, Copas does it. And I'm sure many
others do it too.

Question is: If I need two of these libraries at once, how do I
combine their loops?

There should be a general solution for this IMHO.

The underlying question is, what events do the libraries wait on. If
it's all socket select, it should be combinable quite easy. If it's
something else, well... I don't know.

Concrete example:

I want to use both IupLua and Verse. How do I do it?

Verse has a step() function and IupLua has timers, so I could call the
Verse step function in an IupLua timer for a first approximation. Not
optimal, timing-wise, probably, but it's a start.

Any thoughts...?

Cheers,
Stefan