Shared mutable object in crossroads property handler #348
-
I need to have a shared mutable reference to the underlying object in the cross roads handler. In order to achieve that I've wrapped the object in an I'm using
This is fine but when I actually try to lock the mutex to use it I need to await it. So I saw a method called
I get this error
I don't really understand what to do here now :/ any help would be appreciated. I'm trying to wrap a DBus interface over a service that's running a separate tokio task which is why I think I need the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
You need to call |
Beta Was this translation helpful? Give feedback.
You need to call
PropContext::reply
instead of returning the value directly, i.e.prop.reply(Ok(s.is_online))
in the last line of your async block.