Skip to content
This repository was archived by the owner on Oct 11, 2021. It is now read-only.
This repository was archived by the owner on Oct 11, 2021. It is now read-only.

Curious question #1

Open
Open
@innerop

Description

@innerop

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions