microsoft / microsoft/STL

`<mutex>`: `mutex` and `condition_variable` could provide `native_handle()` again

Open
#3,820 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

#3770 is removing the useless implementations of native_handle() in mutex (et al.) and condition_variable.

We could restore them to return void* pointing to the underlying SRWLOCK and CONDITION_VARIABLE, now that we know that this machinery is always used. (It would be permanently "punching through" to the DLL/LIB's representation.)

Remember to restore the minimal test coverage of native_handle() in tests/std/tests/Dev11_1150223_shared_mutex/test.cpp.

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 reviewing #3770 and the existing synchronization implementations, then inspect tests/std/tests/Dev11_1150223_shared_mutex/test.cpp for the prior native_handle() coverage. Done means mutex and condition_variable provide native_handle() values for the underlying Windows primitives and the minimal test coverage is restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.