MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / recv

Method recv

flow-rs/src/loader/python/channel.rs:38–45  ·  view source on GitHub ↗
(&mut self, py: Python)

Source from the content-addressed store, hash-verified

36#[pymethods]
37impl PyReceiver {
38 fn recv(&mut self, py: Python) -> PyObject {
39 match with_context(py, || wait(self.imp.recv::<PyObject>())) {
40 Ok(msg) => Py::new(py, PyEnvelope { imp: Some(msg) })
41 .unwrap()
42 .to_object(py),
43 _ => py.None(),
44 }
45 }
46
47 fn batch_recv(&self, py: Python, n: usize, dur: u64) -> (Vec<PyObject>, bool) {
48 let convert = |envelope| {

Callers

nothing calls this directly

Calls 2

with_contextFunction · 0.85
to_objectMethod · 0.80

Tested by

no test coverage detected