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

Method get_timeout

crates/stdlib/src/socket.rs:1071–1078  ·  view source on GitHub ↗

returns Err(blocking)

(&self)

Source from the content-addressed store, hash-verified

1069
1070 /// returns Err(blocking)
1071 pub fn get_timeout(&self) -> Result<Duration, bool> {
1072 let timeout = self.timeout.load();
1073 if timeout > 0.0 {
1074 Ok(Duration::from_secs_f64(timeout))
1075 } else {
1076 Err(timeout != 0.0)
1077 }
1078 }
1079
1080 fn sock_op<F, R>(
1081 &self,

Callers 3

timeout_deadlineMethod · 0.80
sock_opMethod · 0.80
sendallMethod · 0.80

Calls 2

ErrClass · 0.50
loadMethod · 0.45

Tested by

no test coverage detected