MCPcopy Index your code
hub / github.com/RustPython/RustPython / register

Method register

crates/stdlib/src/select.rs:453–464  ·  view source on GitHub ↗
(
                &self,
                Fildes(fd): Fildes,
                eventmask: OptionalArg<EventMask>,
            )

Source from the content-addressed store, hash-verified

451 impl PyPoll {
452 #[pymethod]
453 fn register(
454 &self,
455 Fildes(fd): Fildes,
456 eventmask: OptionalArg<EventMask>,
457 ) -> PyResult<()> {
458 let mask = match eventmask {
459 OptionalArg::Present(event_mask) => event_mask.0,
460 OptionalArg::Missing => DEFAULT_EVENTS,
461 };
462 insert_fd(&mut self.fds.lock(), fd, mask);
463 Ok(())
464 }
465
466 #[pymethod]
467 fn modify(

Callers

nothing calls this directly

Calls 6

insert_fdFunction · 0.85
get_epollMethod · 0.80
addFunction · 0.50
lockMethod · 0.45
as_raw_fdMethod · 0.45
into_pyexceptionMethod · 0.45

Tested by

no test coverage detected