Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worker: refactor thread id management #25796

Closed
wants to merge 1 commit into from

Commits on Feb 1, 2019

  1. worker: refactor thread id management

    - Assign thread IDs to `Environment` instances, rather than Workers.
      This is more embedder-friendly than the current system, in which
      all “main threads” (if there are multiple ones) would get the
      id `0`.
    - Because that means that `isMainThread === (threadId === 0)` no longer
      holds, refactor `isMainThread` into a separate entity. Implement it
      in a way that allows for future extensibility, because we use
      `isMainThread` in multiple different ways (determining whether there
      is a parent thread; determining whether the current thread has control
      of the current process; etc.).
    addaleax committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    38f26a3 View commit details
    Browse the repository at this point in the history