MCPcopy Create free account
hub / github.com/MultithreadedJSBook/code-samples / worker.js

File worker.js

ch2-patterns/worker.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1const sleep = (ms) => new Promise((res) => setTimeout(res, ms)); // <1>
2
3function asyncOnMessageWrap(fn) { // <2>
4 return async function(msg) {

Callers

nothing calls this directly

Calls 1

asyncOnMessageWrapFunction · 0.70

Tested by

no test coverage detected