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

Method close

flow-rs/src/loader/python/node.rs:161–174  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

159 unimplemented!()
160 }
161 fn close(&mut self) {
162 for ports in self.inputs.values_mut() {
163 for port in ports.storage.values_mut() {
164 // it is safe because there is no other port-ref used.
165 unsafe { &mut *(Arc::as_ptr(port) as *mut Receiver) }.abort();
166 }
167 }
168 for ports in self.outputs.values_mut() {
169 for port in ports.storage.values_mut() {
170 // it is safe because there is no other port-ref used.
171 unsafe { &mut *(Arc::as_ptr(port) as *mut Sender) }.abort();
172 }
173 }
174 }
175 fn is_allinp_closed(&self) -> bool {
176 let mut is_closed = true;
177 for ports in self.inputs.values() {

Callers 1

start_loopMethod · 0.45

Calls 1

abortMethod · 0.45

Tested by

no test coverage detected