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

Function load_shared

flow-rs/src/node/shared.rs:296–310  ·  view source on GitHub ↗
(
    cfg: &crate::config::interlayer::Node,
    graphs: &crate::config::interlayer::Config,
    ctx: Context,
    resources: ResourceCollection,
)

Source from the content-addressed store, hash-verified

294crate::collect!(String, SharedProxy);
295
296pub fn load_shared(
297 cfg: &crate::config::interlayer::Node,
298 graphs: &crate::config::interlayer::Config,
299 ctx: Context,
300 resources: ResourceCollection,
301) -> Result<SharedProxy> {
302 let local_key = ctx.local_key;
303 let (s, r) = unbounded();
304 let shared = Shared::new(ctx.local_key, r, cfg, graphs)?.boxed();
305 let handle = shared.start(ctx, resources);
306 SharedHandle::registry_local()
307 .get(local_key)
308 .insert(cfg.entity.name.clone(), SharedHandle(handle));
309 SharedProxy::new(local_key, s, cfg)
310}

Callers 1

load_implFunction · 0.85

Calls 7

unboundedFunction · 0.85
SharedHandleClass · 0.85
insertMethod · 0.80
boxedMethod · 0.45
startMethod · 0.45
getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected