using the wakeup_main_function together with dispatch_status_function
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Thu Sep 25 01:35:16 PDT 2008
2008/9/25 Havoc Pennington <hp at pobox.com>:
> Anyway, you could look at the source and see if they are always called
> together, but it might be just as easy to just set both, and they
> aren't guaranteed to always be called together in future versions.
In the binding of dbus to my language I used only
dbus_connection_set_dispatch_status_function, and no
dbus_connection_set_wakeup_main_function at all. The rationale was
that I think I know what to do on dispatch status change: notify a
condition variable which is used by a thread which dispatches DBus
messages (I meant the condition variable and the thread of my
language, they aren't mapped to the corresponding POSIX concepts). On
the other hand I did not know what to do as "wake up the main loop":
while the language runtime does have a main loop with an internal pipe
for handing it over between POSIX threads, it makes no sense for a
library to wake it up for no explicit reason.
--
Marcin Kowalczyk
qrczak at knm.org.pl
http://qrnik.knm.org.pl/~qrczak/
More information about the dbus
mailing list