MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / event_handler

Method event_handler

rate_limiter/src/group.rs:85–87  ·  view source on GitHub ↗

This function needs to be called every time there is an event on the FD provided by this object's `AsRawFd` trait implementation. # Errors If the rate limiter is disabled or is not blocked, an error is returned.

(&self)

Source from the content-addressed store, hash-verified

83 ///
84 /// If the rate limiter is disabled or is not blocked, an error is returned.
85 pub fn event_handler(&self) -> Result<(), Error> {
86 self.eventfd.read().map_err(Error::EventFdRead).map(|_| ())
87 }
88
89 /// Returns whether this rate limiter is blocked.
90 ///

Calls 2

mapMethod · 0.45
readMethod · 0.45