C-API
Thiago Macieira
thiago at kde.org
Thu Oct 12 10:00:37 PDT 2006
John (J5) Palmieri wrote:
> You could simply call
>dbus_connection_read_write_and_dispatch with a 0 timeout in a source
>(most likely the least efficient but easy to implement) or you could
>compromise and call dbus_connection_read_write_and_dispatch from a
>thread.
The thread solution doesn't really work. We've talking about that on IRC
and code inspection revealed that any blocking sends performed in other
threads will not work -- the transport is locked.
Therefore, it's necessary to use a select(2)-based loop with a way to wake
up the thread. This, in turn, requires handling of timers. So you end up
writing a full mainloop.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061012/b1b4347c/attachment.pgp
More information about the dbus
mailing list