[Bug]: Docs say gtest isn't threadsafe on windows, but implementation disagrees
- Dominant language
- C++
- Stars
- 39.5k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
### Describe the issue
The docs for [known limitations](https://google.github.io/googletest/primer.html#known-limitations) says:
> Google Test is designed to be thread-safe. The implementation is thread-safe on systems where the pthreads library is available. It is currently unsafe to use Google Test assertions from two threads concurrently on other systems (e.g. Windows). In most tests this is not an issue as usually the assertions are done in the main thread. If you want to help, you can volunteer to implement the necessary synchronization primitives in gtest-port.h for your platform.
However, looking at that file, it says https://github.com/google/googletest/blob/e9092b12dc3cf617d47578f13a1f64285cfa5b2f/googletest/include/gtest/internal/gtest-port.h#L804-L817
So is the documentation out of date, or is that file claiming to be thread safe while it still isn't?
### Steps to reproduce the problem
Read docs, then look at referred-to code
### What version of GoogleTest are you using?
Looking at master
### What operating system and version are you using?
The question is about windows
### What compiler and version are you using?
Probably msvc
### What build system are you using?
bazel
### Additional context
It is silly to make these questions required when they don't apply to all bugs, eg documentation bugs.
Contributor guide
Research direction
Start with the known limitations section in the linked primer documentation and the referenced gtest-port.h lines. Compare the Windows thread-safety documentation with the implementation and determine which is accurate. Done means the documentation and implementation claims are consistent, with any needed clarification covered by the relevant documentation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100