Re: [Rhythmbox-devel] plugins and threads



Hey Christian,

On Mon, 2007-10-01 at 17:49 +0200, Christian Buennig wrote:
> But since I prefer to write my plugin in Python: Does anyone have an
> idea to implement a server plugin without an extra thread? A solution
> might be to let Rhythmbox periodically "tick" my plugin so that the
> plugin can inspects its sockets for incoming data with non-blocking IO,
> but I do not know how to get such a periodic "tick" from Rhythmbox.

If you have a select'able object (file, socket, etc) also check out
gobject.io_add_watch(). I'm using it in Rhythmweb to get a callback when
an incoming http request is received, it works really well.

/Mike

-- 
Michael Gratton is hip to your jive.
<http://web.vee.net/>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]