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

Method allow_threads

crates/vm/src/vm/mod.rs:682–684  ·  view source on GitHub ↗
(&self, f: impl FnOnce() -> R)

Source from the content-addressed store, hash-verified

680 /// Equivalent to CPython's `Py_BEGIN_ALLOW_THREADS` / `Py_END_ALLOW_THREADS`.
681 #[inline]
682 pub fn allow_threads<R>(&self, f: impl FnOnce() -> R) -> R {
683 thread::allow_threads(self, f)
684 }
685
686 /// Check whether the current thread is the main thread.
687 /// Mirrors `_Py_ThreadCanHandleSignals`.

Callers 15

sock_op_timeout_errMethod · 0.80
connect_innerMethod · 0.80
acquireMethod · 0.80
sem_timedwait_polledFunction · 0.80
selectFunction · 0.80
pollMethod · 0.80
sleepFunction · 0.80
lockMethod · 0.80
lock_optMethod · 0.80
readMethod · 0.80
readintoMethod · 0.80
writeMethod · 0.80

Calls 1

allow_threadsFunction · 0.85

Tested by

no test coverage detected