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

Method drop

rate_limiter/src/group.rs:112–119  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

110
111impl Drop for RateLimiterGroupHandle {
112 fn drop(&mut self) {
113 let mut handles = self.inner.handles.lock().unwrap();
114 let index = handles
115 .iter()
116 .position(|handle| handle.as_raw_fd() == self.eventfd.as_raw_fd())
117 .expect("RateLimiterGroupHandle must be subscribed to RateLimiterGroup");
118 handles.remove(index);
119 }
120}
121
122struct RateLimiterGroupInner {

Callers

nothing calls this directly

Calls 5

iterMethod · 0.80
takeMethod · 0.80
as_raw_fdMethod · 0.45
removeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected