[Rhythmbox-devel] plugins and threads



Hi,

I have a question concerning threads in RB plugins.

I am writing a plugin which implements a server to communicate with
Bluetooth devices (Bluetooth remote control for Rhythmbox ->
http://remuco.sf.net). To immediately catch data from bluetooth clients,
the server needs to run in an own thread. I've read your remarks on
threads and RB plugnis in the plugin writing guide. However, with this
in mind I have no idea how to implement a plugin that makes up a server
without making use of an extra thread .. so I guess I have to write my
plugin in C.

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.

Thanks in advance for some advice..

Christian





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