Pretty much new to using dbus and I have following sample, that wouldn't work for me.
I use "org.freedesktop.ScreenSaver" interface with method int GetIdleTime() to retrieve idle duration,
and "com.canonical.Unity.Session" interface to provide Locked event.
I retrieve instances of both interfaces using T GetObject
Everything works fine so far, untill,
if, for example I call GetIdleTime() inside Locked event delegate.
Once locked event occur, and tries to read idle time, it never completes reading it. No exceptions, just hangs.
I tried looping idle time every 200ms for example, even while passing into Locked state, and out, no problems there.
Could someone please clarify if I am misusing the dbus or deadlock like this happens by design??
Edit
Tried to bubble event with reactive extensions and schedule subscription on new thread and it seemed to work now.
Pretty much new to using dbus and I have following sample, that wouldn't work for me.
I use "org.freedesktop.ScreenSaver" interface with method int GetIdleTime() to retrieve idle duration, and "com.canonical.Unity.Session" interface to provide Locked event.
I retrieve instances of both interfaces using T GetObject
Everything works fine so far, untill,
if, for example I call GetIdleTime() inside Locked event delegate.
Once locked event occur, and tries to read idle time, it never completes reading it. No exceptions, just hangs. I tried looping idle time every 200ms for example, even while passing into Locked state, and out, no problems there.
Could someone please clarify if I am misusing the dbus or deadlock like this happens by design??
Edit Tried to bubble event with reactive extensions and schedule subscription on new thread and it seemed to work now.