microsoft / microsoft/STL

`<atomic>`: reconsider atomic wait on `shared_ptr`

Open
#5,356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement vNext
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

After #3655 fix, atomic wait on shared_ptr has timed backoff for the case of control blocks difference but value match.

We need to consider alternatives to this timed backoff for vNext.

WaitOnAddress on 128 bits may be invented by then.

Otherwise, may consider making atomic<shared_ptr> use a different approach, like the fallback we have for non-lock-free atomics.

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading #3655 and the current atomic wait design, then compare the timed backoff with the existing fallback for non-lock-free atomics. Revisit the WaitOnAddress limitation and #169 before vNext work begins; done means a vNext-compatible alternative is selected and implemented without the current binary-compatibility constraint.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.