https://bugs.freedesktop.org/show_bug.cgi?id=61328

--- Comment #4 from Tanu Kaskinen <[email protected]> ---
(In reply to comment #3)
> Thank Tanu`s reply :)
> 
> Yes pa_threaded_mainloop is working correctly in my cgtk.c and console.py
> testcases
> https://github.com/xiangzhai/pypulseaudio/blob/master/examples/cgtk.c
> 
> But the pygtk.py testcase is different from console.py, because there is
> already a GMainLoop in PyGtk (Gtk+-2.0 Python Binding), so is it possible
> that shared data from concurrent modifications by pa_threaded_mainloop &&
> GMainLoop?

No, I'm pretty sure pa_threaded_mainloop and GMainloop do not access or modify
any shared data.

The problem might be that PyEval_CallFunction() is called from the thread
created by pa_threaded_mainloop. The GMainLoop runs in a different thread, so
if PyEval_CallFunction() expects to be run in the GMainLoop thread, things will
explode.

Are you sure pa_threaded_mainloop is the right choice? If you're using
GMainLoop, you can use pa_glib_mainloop to integrate libpulse with the same
GMainLoop that you're already using. If you specifically want to run the
pulseaudio stuff in a separate thread, pa_threaded_mainloop can be used, but
then you must not call PyEval_CallFunction() directly from the libpulse
callbacks, but instead notify the GMainLoop thread about the events and call
PyEval_CallFunction() from the GMainLoop thread.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
pulseaudio-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs

Reply via email to