Re: [Rhythmbox-devel] plugins and threads



On Tue, 2007-10-02 at 10:10 +0800, Thomas Zander wrote:
> On 01/10/2007, Christian Buennig <masala web de> 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.
> 
> Just for interest...from the "writing plugins guide" we learn that
> there is no support for threads in python plugins. What is the reason
> for this? Why would the standard "import thread" not work?

Rhythmbox doesn't currently call PyEval_InitThreads() in it's python
startup code, which is needed if we want to allow threads in python.

You can try adding it, but I recall there were some thread-safety
problems somewhere, possibly in the rhythmbox-python binding code.


Cheers,

-- 
"So you can imagine the frustration of switching to a system where the
screensaver actually slows down the computer instead of speeding it up
like an Amiga user would expect." -- Logan Shaw



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