[fpc-pascal] D-Bus. Non blocking listening for signals

Henry Vermaak henry.vermaak at gmail.com
Sun Jan 2 20:11:49 CET 2011


On 2 January 2011 18:49,  <dibo20 at wp.pl> wrote:
> Hi,
>
> Month ago I posted a bug (http://bugs.freepascal.org/view.php?id=18117)
> Admin give me solution and feedback, but this solution doesn't work well and
> i think he don't read my last comment.
> So, maybe someone have this same problem. There is good demo for d-bus
> rewrited line by line from official C example. It works fine, but this is
> console demo. This demo listen for signals in main loop. In GUI application,
> this example blocks user interface. I received a solution to use
> Application.OnIdle event for check for signal. It works, but not detect all
> signals. If host send 10 this same signals, my application detect only 4-6.
> This problem raise after upgrade d-bus interface from 0.92 to 1.2.16 two
> months ago. Previously, I could use timers and threads for listening
> signals.

You may already know this, but it may help to point out that the
OnIdle event won't fire if there are no other events.  For example,
you'll have to move your mouse or hit the keyboard for the OnIdle
event to be called.  I don't know if this will affect talking to dbus
(does it queue up the signals?).

Henry



More information about the fpc-pascal mailing list