You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.
You can do everything with worker threads and shared memory that you're doing with generators but use all CPU cores.
Are you aware of any disadvantages?
EDIT:
The scenario the encloses the question above is having a realtime dashboard based on IMGUI (immediate mode graphics) pattern and using 2D Canvas or WebGL context for drawing. In this scenario, we can have workers sharing a virtual canvas (shared 2D array representing pixels) and each worker is in charge of updating a virtual widget on that canvas. On the main UI thread, we read from that 2D array and draw on canvas.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
This is terrific.
I'm just wondering why you've opted to use generators instead of worker threads and shared memory with the Atomics API (https://hacks.mozilla.org/2016/05/a-taste-of-javascripts-new-parallel-primitives/)
You can do everything with worker threads and shared memory that you're doing with generators but use all CPU cores.
Are you aware of any disadvantages?
EDIT:
The scenario the encloses the question above is having a realtime dashboard based on IMGUI (immediate mode graphics) pattern and using 2D Canvas or WebGL context for drawing. In this scenario, we can have workers sharing a virtual canvas (shared 2D array representing pixels) and each worker is in charge of updating a virtual widget on that canvas. On the main UI thread, we read from that 2D array and draw on canvas.
The text was updated successfully, but these errors were encountered: