Closed oberien closed 7 years ago
One problem is that Handle::spawn
expects a 'static
lifetime. In the current state of our dbus
implementation it's not possible to not have a reference to Connection
. Therefore this probably needs a complete refactor of our dbus implementation.
In particular it's not possible to inhibit
the connection outside of DBusItems
. So we'll probably need to integrate reinhibiting dbus into <DBusItems as Stream>::poll
.
Before switching to tokio / futures / mio, we had the structure of Pollables being separated into non-critical tasks, meaning they can die without any further implication, and critical tasks, which would end the whole application if one fails or all end successfully. With tokio, we can achieve the same by spawning non-critical tasks into a
Handle
and joining all criticals tasks into a single future which is executed withCore::run
.