Andreas Büsching wrote:
>> Remember the discussions we had about timer. Should a timer fire again
>> when the same timer is still in progress? Do we schedule the new timer
>> when the callback is started or when it is stopped? Some parts of kaa
>> need the way it is now and it is the same way glib is doing it. So
>> using nf_generic or nf_gtk is the same. But when twisted does it
>> different, what should we do? I already know one problem: when you
>> call sys.exit(0) in a callback, both nf_generic and nf_gtk stop the
>> loop, twisted just prints an error.
>
> To be honest, I think this is a hack in twisted and could be fixed by a
> nf_twisted implementation if this is really necessary.

There are already two ways to include twisted in kaa.notifier. In
fact, the idea with the thread comes from twisted. They had problems
with integrating some mainloops and designed a threaded reactor to run
twisted in a thread. I wrote a kaa reactor based on that and it is
possible to run twisted in kaa without any patches to pynotifier.

After that came the idea to do the same with kaa.notifier to keep
integration simple. That is the reason I wrote kaa in twisted which
needs this small three line hack. But you can only do this at
kaa.notifier level because pynotifier itself supports no thread. I
personally like the idea that you can hook kaa.notifier in any
mainloop that supports callbacks from threads. This makes including
new mainloops a matter of around 10 lines of code.


> Is there anyone who can answer the questions about twisted
> concerning the handling of timers and so on? Maybe there are no
> differences and an implementation is quite simple.

Twisted also uses a generic idea like pynotifier. You can run twisted
in gtk, qt and many more mainloops. You have to check them all and you
still can't be sure a new reactor still reacts the same.



Dischi

-- 
There are two ways to write error-free programs. Only the third one
works.

Attachment: pgpzE0OP9oaGe.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