MCPcopy Index your code
hub / github.com/nodejs/node / internal

Function internal

lib/internal/cluster/utils.js:33–51  ·  view source on GitHub ↗
(worker, cb)

Source from the content-addressed store, hash-verified

31// Returns an internalMessage listener that hands off normal messages
32// to the callback but intercepts and redirects ACK messages.
33function internal(worker, cb) {
34 return function onInternalMessage(message, handle) {
35 if (message.cmd !== 'NODE_CLUSTER')
36 return;
37
38 let fn = cb;
39
40 if (message.ack !== undefined) {
41 const callback = callbacks.get(message.ack);
42
43 if (callback !== undefined) {
44 fn = callback;
45 callbacks.delete(message.ack);
46 }
47 }
48
49 ReflectApply(fn, worker, arguments);
50 };
51}

Callers 2

primary.jsFile · 0.85
child.jsFile · 0.85

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…