Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Linux, no output from interface method #59

Open
@jurijr

Description

@jurijr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions