Tracking DBusWatches

Havoc Pennington hp at redhat.com
Mon Feb 5 14:36:31 PST 2007



tsuraan wrote:
> 
>     The two watches probably have different flags (one is supposed to be
>     watched for reading, one for writing). So they are in fact different
>     and
>     you need to add both of them, with different conditions watched for
>     depending on the flags.
> 
> 
> That is indeed the case.  Are read and write mutually exclusive, or do I 
> need to look out for watches that need to be added to both read and 
> write mappings (I'm planning on keeping a mapping from fd -> watch). 
> 

The intent of the API is that both flags could be on one watch, but 
right now libdbus only ever sets up the two separate watches. The 
downside of both flags on one watch would be that read/write would have 
to be enabled/disabled together. So I imagine even a future kind of 
DBusConnection transport would probably need two different watches.

Havoc


More information about the dbus mailing list