Race condition with dbus_connection_send_with_reply()?
havoc.pennington at gmail.com
Tue Mar 3 23:33:08 PST 2009
DBusPendingCall was created with a main loop in mind, the assumption
being people would use dbus_connection_send_with_reply_and_block()
with threads. But blocking with threads apparently has some issues
also. Someone needs to figure it out. I would start by getting some
decent test coverage on threaded dbus usage and/or running helgrind,
and then also thinking conceptually how it should work of course.
DBusPendingCall has some conceptual problems with threads because the
notifier function would always be called from the
connection-dispatching thread not the method-calling thread.
In general I'm not sure it's sane to do much in threads besides block
for replies, because dispatching can only happen in one thread, and
dispatching and blocking are about the only two things the connection
More information about the dbus