diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-12 20:24:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-12 20:24:58 +0000 |
commit | 1da49f753629e2c84d09c0cad4cb1bb88c4dc0e5 (patch) | |
tree | 3a6ecfb09a7f21a2e132e07fb447221c6b8e6cd1 /storageframework/src | |
parent | e1996c4514f65c66aa31fc9290406a2f0f4a83c3 (diff) |
vespalib::Monitor -> std::mutex and std::condition_variable
Diffstat (limited to 'storageframework/src')
-rw-r--r-- | storageframework/src/vespa/storageframework/generic/thread/thread.cpp | 7 | ||||
-rw-r--r-- | storageframework/src/vespa/storageframework/generic/thread/thread.h | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/storageframework/src/vespa/storageframework/generic/thread/thread.cpp b/storageframework/src/vespa/storageframework/generic/thread/thread.cpp index 24ed28d077b..ee92753a23c 100644 --- a/storageframework/src/vespa/storageframework/generic/thread/thread.cpp +++ b/storageframework/src/vespa/storageframework/generic/thread/thread.cpp @@ -1,18 +1,13 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "thread.h" -#include <vespa/vespalib/util/sync.h> namespace storage::framework { void -Thread::interruptAndJoin(vespalib::Monitor* m) +Thread::interruptAndJoin() { interrupt(); - if (m != nullptr) { - vespalib::MonitorGuard monitorGuard(*m); - monitorGuard.broadcast(); - } join(); } diff --git a/storageframework/src/vespa/storageframework/generic/thread/thread.h b/storageframework/src/vespa/storageframework/generic/thread/thread.h index 26c59ce1330..814686eb4fa 100644 --- a/storageframework/src/vespa/storageframework/generic/thread/thread.h +++ b/storageframework/src/vespa/storageframework/generic/thread/thread.h @@ -58,7 +58,7 @@ public: * Utility function to interrupt and join a thread, possibly broadcasting * through a monitor after the signalling face. */ - void interruptAndJoin(vespalib::Monitor* m); + void interruptAndJoin(); void interruptAndJoin(std::condition_variable &cv); }; |