Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Remove concurrent access to objects from worker threads #667

Closed

Description

@kkaefer

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.

Activity

  1. ljbade commented on Dec 1, 2014

    @ljbade
    Contributor

    Is there a way to do this nicely with C++, ie worker thread pausing and updating happens automatically when you call some write access method? (ie all all non const methods)

  2. self-assigned this
    on Sep 9, 2016
  3. added
    Core
    on Mar 10, 2017
  4. ChrisLoer commented on Apr 4, 2017

    @ChrisLoer
    Contributor

    Fixed with #8341.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Core

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions