MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / useMessageChannel

Function useMessageChannel

libraries/p5.js:107–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106// web worker
107function useMessageChannel() {
108 var channel = new MessageChannel();
109 channel.port1.onmessage = flush;
110 return function () {
111 return channel.port2.postMessage(0);
112 };
113}
114
115function useSetTimeout() {
116 // Store setTimeout reference so es6-promise will be unaffected by

Callers 1

p5.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected