main-- / windows-gaming

This project makes it easy and straightforward to set up PCI/VGA passthrough on your system. - OR AT LEAST IT WOULD, IF IT WASNT DEAD
6 stars 1 forks source link

(Non)Critical Tasks #84

Closed oberien closed 7 years ago

oberien commented 7 years ago

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 with Core::run.

oberien commented 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.