Jason Tackaberry wrote:
> On Thu, 2007-12-27 at 21:29 +0100, Dirk Meyer wrote:
>> > What is the behavior of pynotifier with simulate=True?  From what I can
>> > see it just causes it to call select() on any fds we're monitoring, but
>> > doesn't do anything else (call timers or dispatchers) or even invoke
>> > callbacks for the fds that had activity.
>> 
>> Right
>
> So why is it important that we select on fds but not do anything with
> the events?  What happens if we don't call select?  i.e. why call
> nf_wrapper.step() at all?

Problem: kaa notifier is running in a different mainloop
(e.g. twisted) but the callbacks should be called from the real main
thread. So I run step() in a thread without doing anything
(simulate). When this function returns, something is going on and I
trigger a callback in the real mainloop. Now in the real mainloop I
call step() again, this time I know that select won't block
(sleep=False) and that there is something to do.


Dischi

-- 
There are very few problems that cannot be solved by orders ending with
'or die.' - Alistair J.R. Young

Attachment: pgp1YaShNLOGS.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to