GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Consider enforcing --experimental-worker flag until Atomics.wake is renamed Atomics.notify · Issue #21219 · nodejs/node

Consider enforcing --experimental-worker flag until Atomics.wake is renamed Atomics.notify #21219

New issue
Copy link
New issue
Copy link
Closed
Closed
Consider enforcing --experimental-worker flag until Atomics.wake is renamed Atomics.notify#21219
Copy link
Labels
workerIssues and PRs related to the worker_threads module and Worker API.

Description

@rwaldron
rwaldron
opened on Jun 8, 2018
Issue body actions

At the May TC39 meeting, I proposed renaming Atomics.wake to Atomics.notify in order to better differentiate it from Atomics.wait: Renaming Atomics.wake (please review before continuing). With complete support from implementers, the committee agreed and set forth "next steps".

The "needs consensus" PR will not be up for approval until late July. If Node ships the new Worker API without a flag before that approval, developers will inevitably write programs that rely on Atomics.wake and the argument on which I predicated this opportunity for improvement will be struck down, ie. that no new code featuring Atomics.wake has been written since the Spectre/Meltdown mitigations.

Can we work together on this? That would be ❤️ 👍

Reacted by Leo Balter, Benjamin Gruenbaum and Ruben Bridgewater

Activity

  1. rwaldron commented on Jun 8, 2018

    @rwaldron
    rwaldron
    on Jun 8, 2018
    Author
    More actions

    cc @addaleax

  2. addaleax
    added
    workerIssues and PRs related to the worker_threads module and Worker API.
    on Jun 8, 2018
  3. devsnek commented on Jun 8, 2018

    @devsnek
    devsnek
    on Jun 8, 2018
    Member
    More actions

    this seems reasonable, I'm always a fan of helping out tc39. I doubt we would have unflagged workers by then anyway.

    Reacted by Anna Henningsen, Timothy Gu and Benjamin Gruenbaum
  4. addaleax commented on Jun 8, 2018

    @addaleax
    addaleax
    on Jun 8, 2018
    Member
    More actions

    I’m totally on board with the rename.

    Once the decision for a name is made, what I’d see Node doing is providing the new name immediately, and providing Atomics.wake (with a deprecation warning either immediately or in the next major version). How exactly that looks is probably going to depend on how V8 ends up implementing the name change.

    The "needs consensus" PR will not be up for approval until late July. If Node ships the new Worker API without a flag before that approval.

    I don’t think that’s realistic, it’s going to take (possibly a lot) longer than that. If nothing else, we can always block that on this issue.

    Reacted by snek, Leo Balter, Timothy Gu, antsmartian and Benjamin Gruenbaum
  5. leobalter commented on Jun 8, 2018

    @leobalter
    leobalter
    on Jun 8, 2018
    Contributor
    More actions

    As someone working on the current renaming proposal, I appreciate your support @devsnek @addaleax!

    Reacted by snek and Benjamin Gruenbaum
  6. benjamingr commented on Jun 11, 2018

    @benjamingr
    benjamingr
    on Jun 11, 2018
    Member
    More actions

    Hey @rwaldron @leobalter - from another angle it would be absolutely fantastic if you took --experimental-worker for a spin and give Node criticism about how it works and whether or not it aligns with your vision.

    Note that even if we do ship workers unflagged (which I think we won't, now that you've asked and Anna and Gus both agreed and I agree with them) - they'd still be experimental and we'd still be fine with "breaking" Atomics.wake.

  7. rwaldron commented on Jun 12, 2018

    @rwaldron
    rwaldron
    on Jun 12, 2018
    Author
    More actions

    @benjamingr will do!

  8. rwaldron commented on Jun 12, 2018

    @rwaldron
    rwaldron
    on Jun 12, 2018
    Author
    More actions

    Once the decision for a name is made

    This has already been agreed to: Atomics.notify

  9. addaleax commented on Jun 12, 2018

    @addaleax
    addaleax
    on Jun 12, 2018
    Member
    More actions

    @rwaldron Does that mean that we could introduce that alias in Node right now? Or is it “just” the fixed name in the proposal and TC39 has yet to decide whether it’s going to be merged in the spec that way?

  10. rwaldron commented on Jun 19, 2018

    @rwaldron
    rwaldron
    on Jun 19, 2018
    Author
    More actions

    @addaleax sorry for the delay responding...

    Does that mean that we could introduce that alias in Node right now?

    That would be ideal, yes.

    Or is it “just” the fixed name in the proposal and TC39 has yet to decide whether it’s going to be merged in the spec that way?

    The change has consensus, but was made subject to the "consensus PR" process.

  11. devsnek commented on Jun 19, 2018

    @devsnek
    devsnek
    on Jun 19, 2018
    Member
    More actions

    is this all that is needed? do we need to worry about function.name?

    Object.defineProperty(Atomics, 'notify', {
      value: Atomics.wake,
      writable: true,
      enumerable: false,
      configurable: true,
    });
  12. addaleax commented on Jun 19, 2018

    @addaleax
    addaleax
    on Jun 19, 2018
    Member
    More actions

    @devsnek I assume we want to do this in NewContext() in node.cc to make sure it’s available that way in VM contexts as well

  13. rwaldron commented on Jun 19, 2018

    @rwaldron
    rwaldron
    on Jun 19, 2018
    Author
    More actions

    is this all that is needed?

    Yes, that works 👍

    do we need to worry about function.name?

    My nitpicking spec conformance self says yes, but my pragmatic self says no ;)

  14. addaleax commented on Jun 19, 2018

    @addaleax
    addaleax
    on Jun 19, 2018
    Member
    More actions

    @devsnek do you want to do this? if not, i’ll put something together today or tomorrow

  15. devsnek commented on Jun 19, 2018

    @devsnek
    devsnek
    on Jun 19, 2018
    Member
    More actions

    @addaleax yeah I can take it.

  16. devsnek
    added a commit that references this issue on Jun 21, 2018

    atomis: add notify alias

    84f3769
  17. targos
    added a commit that references this issue on Jun 22, 2018

    atomis: add notify alias

    a526b4e
  18. Trott commented on Nov 13, 2018

    @Trott
    Trott
    on Nov 13, 2018
    Member
    More actions

    Should this be closed now that there's an alias?

  19. targos commented on Nov 18, 2018

    @targos
    targos
    on Nov 18, 2018
    Member
    More actions

    I think it can. We have Atomics.notify() and Atomics.wake() emits a warning.

  20. targos
    closed this as completedon Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    workerIssues and PRs related to the worker_threads module and Worker API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.