Raw libdbus dispatching

Havoc Pennington hp at redhat.com
Tue Oct 24 15:20:31 PDT 2006

Thiago Macieira wrote:
> What I use is a form of event/timer that is scheduled for immediate 
> execution at the next event loop and disables itself after the first run 
> (it's what we call a "single-shot timer"). It gets enabled in one of 
> these three cases:
> 1) the connection has just been created
> 2) the connection has received Input I/O (the Read watch handler has been 
> called)
> 3) dbus_connection_send_with_reply_and_block has been called and, after it 
> returned, dispatch_status == DATA_REMAINS

In theory you should be able to just call set_dispatch_status_function 
and enable the timer in there (if status == DATA_REMAINS), and that 
would cover all these cases plus any future cases. It could be broken, 
but it's supposed to work.


More information about the dbus mailing list