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

Method start

flow-rs/src/loader/python/node.rs:187–205  ·  view source on GitHub ↗
(
        mut self: Box<Self>,
        _: Context,
        res: ResourceCollection,
    )

Source from the content-addressed store, hash-verified

185
186impl Actor for PyNode {
187 fn start(
188 mut self: Box<Self>,
189 _: Context,
190 res: ResourceCollection,
191 ) -> rt::task::JoinHandle<anyhow::Result<()>> {
192 if self.exclusive {
193 flow_rs::rt::task::spawn_blocking(move || {
194 flow_rs::rt::task::block_on(async move {
195 self.start_loop(res).await;
196 });
197 Ok(())
198 })
199 } else {
200 flow_rs::rt::task::spawn_local(async move {
201 self.start_loop(res).await;
202 Ok(())
203 })
204 }
205 }
206}
207
208pub fn toml2dict<'a>(py: Python<'a>, args: &toml::value::Table) -> PyResult<&'a PyDict> {

Callers

nothing calls this directly

Calls 2

block_onFunction · 0.85
start_loopMethod · 0.80

Tested by

no test coverage detected