Support multithreading on non-POSIX platforms
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 39.6k
- Forks
- 10.9k
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
I've got an idea to leverage the fact that we use C++11.
In primer.md there is a [known limitation](https://github.com/google/googletest/blob/master/googletest/docs/primer.md#known-limitations) that has been around since 642acb (more than 4 years old) and it suggests to write custom platform-specific implementations for concurrency support.
Quote:
> 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.
Now, after we've finally switched to C++11, I suppose it's high time to do it right and have one, portable implementation which will work everywhere. I've started working on a new pull request that will deal with it, though it's not that easy and it's presumably going to take some longer time.
@gennadiycivil - please let me know if you have insight against it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the known limitation in primer.md and inspect the synchronization primitives in gtest-port.h. Determine how the current pthread-based and non-POSIX paths behave under concurrent assertions. Done means Google Test has portable C++11 concurrency support and is safe for concurrent assertions on non-POSIX platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100