Signals in Python without glib

Havoc Pennington hp at redhat.com
Fri Aug 11 07:10:26 PDT 2006


Justin Mazzola Paluska wrote:
> 
> So, what it seems I need to do is call dbus_threads_init.  My
> application requires Python, so that means wrapping the
> dbus_threads_init function (and the corresponding DBusThreadsFunction
> struct) in Python.

Indeed, if you haven't done dbus_thread_init that would explain threads 
problems !

> After some business travel, I’d like to tackle this.  Do you have any
> pointers on what’s the best way to expose the Python locking
> primitives that the DBusThreadsFunction struct needs to DBus?  Or is
> there a better, cross-platform, way to add them (without needing the
> to dip into Python).
> 
> Now I see why everyone’s told to use the glib mainloop.  However, if
> this is possible, the Python bindings are getting closer to having its
> own thread-safe mainloop.


I don't really know anything about python threading or the python 
bindings. For threads_init you need to provide pretty basic stuff; it 
maps directly to pthreads on unix/linux, or to cross-platform threads 
APIs that look like pthread, such as GLib's thread stuff.

Havoc


More information about the dbus mailing list