Module chipset_device::poll_device
source · Expand description
Device poll services.
These services are used to allow an otherwise synchronous device to run work asynchronously. A device can register to have a poll function called whenever an associated waker is woken. The poll function is passed a context that can be used to poll futures.
This provides an alternative to managing a separate asynchronous task for
the device. It simplifies start/stop management (because the poll function
is never called while the device is stopped), and it simplifies object
lifetimes and synchronization (since the poll function is called with &mut self
, so it has full access to the device’s state).
Traits§
- Implemented by devices which register themselves to be polled whenever the associated waker is called.