Repository navigation
Update docs: assertions are thread-safe on desktop Windows - #5103
Open
cindykrafft wants to merge 1 commit into
Open
cindykrafft wants to merge 1 commit into
cindykrafft wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
The primer's Known Limitations section and two notes in advanced.md say that using assertions from multiple threads is unsafe or unsupported on Windows. That is outdated: gtest-port.h defines GTEST_IS_THREADSAFE for desktop Windows (excluding Windows Phone and Windows RT), gtest-port.cc provides Windows implementations of Mutex and ThreadLocal, and the multi-threaded assertion tests guarded by GTEST_IS_THREADSAFE are built there. Fixes google#4769 Claude-Session: https://claude.ai/code/session_01X59fWmqnA4Nmb9rggkTP7n
cindykrafft
force-pushed
the
docs-windows-thread-safety
branch
from
September 23, 2026 21:09
405f0e6 to
e0c99dd
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4769
The primer's "Known Limitations" section says it is unsafe to use assertions from two threads concurrently on systems without pthreads "(e.g. Windows)".
docs/advanced.mdhas two similar notes ("Assertions from multiple threads are currently not supported on Windows."), one after the{ASSERT|EXPECT}_NO_FATAL_FAILUREexample and one after theEXPECT_{NON}FATAL_FAILURE_ON_ALL_THREADSmacros.These statements are outdated:
gtest-port.hdefinesGTEST_IS_THREADSAFEfor desktop Windows. The condition includesdefined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_PHONE) && !defined(GTEST_OS_WINDOWS_RT).gtest-port.ccprovides Windows implementations ofMutex,ThreadLocalandThreadWithParam.GTEST_IS_THREADSAFE, so they are also built on desktop Windows. Examples areExpectFailureWithThreadsTestand the concurrentSCOPED_TRACEtest ingoogletest-output-test_.cc, and the threading tests ingtest_stress_test.ccandgoogletest-port-test.cc.This PR changes documentation only:
advanced.md.