
Hi Simon, --- simon meiklejohn <simon@simonmeiklejohn.com> wrote:
Wouldnt this problem be solved more naturally if an interface were exposed out of the demuxer for signalling the availability of more work as it arrives? The GUI thread could then be made to call back into demuxer::run only when appropriate rather than busily during idle time.
Bit of a chicken-and-egg issue there. You don't want to call demuxer::run unless there's work to do, but you can't know if there's work to do unless you call demuxer::run to dequeue events from the OS's event demultiplexer :) This sort of use case is probably better solved using your proposed windows message pump dispatcher, but I can also see a use for short, timed invocations of demuxer::run. Cheers, Chris