MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / as_fd

Method as_fd

nodedb-bridge/src/eventfd.rs:101–103  ·  view source on GitHub ↗

Get the raw file descriptor for registration with an event loop. The caller can register this fd with: - Tokio: `AsyncFd::new()` - Glommio: `GlommioDma::from_raw_fd()` or similar - io_uring: `IORING_OP_READ` on the fd

(&self)

Source from the content-addressed store, hash-verified

99 /// - Glommio: `GlommioDma::from_raw_fd()` or similar
100 /// - io_uring: `IORING_OP_READ` on the fd
101 pub fn as_fd(&self) -> RawFd {
102 self.fd.as_raw_fd()
103 }
104}
105
106// SAFETY: eventfd is a kernel object. The fd can be shared across threads.

Callers 4

response_wake_fdMethod · 0.80
request_space_fdMethod · 0.80
request_wake_fdMethod · 0.80
response_space_fdMethod · 0.80

Calls 1

as_raw_fdMethod · 0.45

Tested by

no test coverage detected