From: Andreas <cr...@bi...> - 2007-12-28 17:11:06
|
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? >=20 > 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=3DFalse) 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. What about implementing a twisted notifier like nf_gtk or nf_qt? I do not know twisted; is that possible? crunchy --=20 Andreas B=C3=BCsching http://www.bitkipper.ne= t/ cr...@bi... |