Temporarily suspending input in main loop

Havoc Pennington hp at redhat.com
Fri Sep 17 18:00:58 UTC 2004


On Fri, 2004-09-17 at 16:19 +0200, Friedemann Kleint wrote:
> Apparently, there is no easy way to do this?

There is a hack right now which is to set the max received messages size
limit to a low number; see the top of 
_dbus_transport_get_dispatch_status() to understand why.

This shows what you'd do to implement dbus_connection_set_suspended() -
you'd just have a flag and start returning DISPATCH_COMPLETE if the flag
is set.

> One could think of
> 
> - introducing dbus_connection_suspend()/resume functions
>   (that somehow block dispatching)
> 
> - returning the GSource-identifier from
>   dbus_connection_setup_with_g_main() so that the source can be
>   removed and added again later?
>   

I think setup_with_g_main() potentially adds multiple GSource so that
might not be quite right.

Havoc




More information about the dbus mailing list