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 was archived by the owner on Aug 8, 2023. It is now read-only.
Currently, we have a number of objects that are shared across threads. This means we're locking these objects when accessing them. To remove lock contention, and to align the architecture with JS, we should move away from shared memory objects.
The way JS (web workers) operates is by having a read-only state of the object in question (e.g. the sprite/glyph atlas). When a write access is required, the worker thread is suspended and the operation is carried out in the main thread (e.g. adding glyphs to the glyph atlas). Then, the updated state is sent to the worker thread again.
Currently, we have a number of objects that are shared across threads. This means we're locking these objects when accessing them. To remove lock contention, and to align the architecture with JS, we should move away from shared memory objects.
The way JS (web workers) operates is by having a read-only state of the object in question (e.g. the sprite/glyph atlas). When a write access is required, the worker thread is suspended and the operation is carried out in the main thread (e.g. adding glyphs to the glyph atlas). Then, the updated state is sent to the worker thread again.