diff options
author | dmauro <dmauro@google.com> | 2021-10-25 14:54:43 (GMT) |
---|---|---|
committer | CJ Johnson <johnsoncj@google.com> | 2021-11-03 17:45:35 (GMT) |
commit | f503588aeee4629e5673f2d88ddec01c9ed4bd6b (patch) | |
tree | 56ec74efbb708afe625eda5fa225146f211f5d3a /googletest/src | |
parent | 16f637fbf4ffc3f7a01fa4eceb7906634565242f (diff) | |
download | googletest-f503588aeee4629e5673f2d88ddec01c9ed4bd6b.zip googletest-f503588aeee4629e5673f2d88ddec01c9ed4bd6b.tar.gz googletest-f503588aeee4629e5673f2d88ddec01c9ed4bd6b.tar.bz2 |
Googletest export
Replace the multiple implementations of Notification with a single
portable implementation.
The also removes the awkward loop with sleep in Notification and will
allow the removal of SleepMilliseconds.
PiperOrigin-RevId: 405399733
Diffstat (limited to 'googletest/src')
-rw-r--r-- | googletest/src/gtest-port.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index c3c93e6..6faa8b9 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -322,23 +322,6 @@ bool AutoHandle::IsCloseable() const { return handle_ != nullptr && handle_ != INVALID_HANDLE_VALUE; } -Notification::Notification() - : event_(::CreateEvent(nullptr, // Default security attributes. - TRUE, // Do not reset automatically. - FALSE, // Initially unset. - nullptr)) { // Anonymous event. - GTEST_CHECK_(event_.Get() != nullptr); -} - -void Notification::Notify() { - GTEST_CHECK_(::SetEvent(event_.Get()) != FALSE); -} - -void Notification::WaitForNotification() { - GTEST_CHECK_( - ::WaitForSingleObject(event_.Get(), INFINITE) == WAIT_OBJECT_0); -} - Mutex::Mutex() : owner_thread_id_(0), type_(kDynamic), |