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?
Was this page helpful?