Re: How to add a callback that will be called each time when the event queue becomes empty
- From: jcupitt gmail com
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: How to add a callback that will be called each time when the event queue becomes empty
- Date: Sat, 20 Jul 2013 13:27:35 +0100
On 20 July 2013 01:57, Paul Davis <paul linuxaudiosystems com> wrote:
the general solution to this is to use any kind of signalling system
(g_object signals, boost signals, libsigc++ or whatever you prefer) to post
notifications about state changes, and the callbacks/handlers for these
signals should queue an idle callback that returns FALSE
(and only queue it if it is not already queued).
Yes, I do this too, though with a short timeout (100ms? I forget)
rather than an idle. This helps to join up many short state changes.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]