MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / send

Function send

runtime/src/index.js:92–96  ·  view source on GitHub ↗
(type, payload = {})

Source from the content-addressed store, hash-verified

90 };
91
92 const send = (type, payload = {}) => new Promise((resolve, reject) => {
93 const reqId = ++reqIdCounter;
94 pending.set(reqId, { resolve, reject });
95 worker.postMessage({ type, reqId, ...payload });
96 });
97
98 /* Strip mainThreadModules/hostModules before crossing postMessage: not structured-cloneable / loaded on the page. The worker only needs eager manifests and the lazy host names. */
99 const { mainThreadModules: _drop, hostModules: _dropHosts, ...workerOpts } = opts || {};

Callers 1

createWorkerFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected