Andreas Büsching wrote:
> Hi,
>
> On Thu, 2007-12-27 at 22:54 +0100, Dirk Meyer wrote:
>> > 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.
>
> If I remember correctly I suggested to implemented a twisted-notifier in
> pyNotifier as I do not like the idea to have a feature in nf_generic
> that in most case is not used ("un-used" code that requires cpu time)
> and that is not supported by the other notifier implementations.

Right, you did

> What about implementing a twisted notifier like nf_gtk or nf_qt? I do
> not know twisted; is that possible?

It should be possible, but every new notifier is a bit different.
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 avoid problems like that I want to run nf_generic inside every
mainloop that provides a callback from a thread. 


Dischi

-- 
There ought to be a better way to start the day than by getting up in
the morning.

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