lua-users home
lua-l archive

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


Asko Kauppi wrote:
Ah, yeah.

Your flag thing is a "one entry queue" but I was expecting Bert not to want to lose a single interrupt (and them to be different, like having some data values attached, that Lua would care about).

Anyways, already this is getting speculative, since we don't know what Bert does. Bert: if you want an event dispatch queue, I can send code I've used in LuaX/SDL_mixer, to catch played music samples at real time (and show the graphs by Lua). Don't remember about memory allocation, but yes, most likely one alloc per interrupt is needed there.
Or you allocate a buffer up front, and increase the size in the user space receiver once >n% has been used. Never a good idea to allocate during an interrupt, and often not allowed on many systems.

--
Lisa