DenoDDeno
Powered by
jcayzacJ
Denoβ€’3y agoβ€’
19 replies
jcayzac

Most efficient way to broadcast messages globally across main script and workers?

I basically want a simple message bus that is global to all my workers + the main script, without relying on any dependency.

Is there something more efficient, maybe using MessageChannel, than using postMessage() in workers to send things to the main script and iterate through all workers in the main script to postMessage() again on each worker?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Monkey patch Broadcast Channel to send messages to current context
SnabelSSnabel / help
4y ago
How to make workers unable to crash the main program
Andreu BotellaAAndreu Botella / help
3y ago