diff options
Diffstat (limited to 'src/common/thread_worker.h')
| -rw-r--r-- | src/common/thread_worker.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/thread_worker.h b/src/common/thread_worker.h index 62c60f724..260ad44e4 100644 --- a/src/common/thread_worker.h +++ b/src/common/thread_worker.h | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | #include <condition_variable> | 7 | #include <condition_variable> |
| 8 | #include <functional> | 8 | #include <functional> |
| 9 | #include <mutex> | 9 | #include <mutex> |
| 10 | #include <stop_token> | ||
| 11 | #include <string> | 10 | #include <string> |
| 12 | #include <thread> | 11 | #include <thread> |
| 13 | #include <type_traits> | 12 | #include <type_traits> |
| 14 | #include <vector> | 13 | #include <vector> |
| 15 | #include <queue> | 14 | #include <queue> |
| 16 | 15 | ||
| 16 | #include "common/polyfill_thread.h" | ||
| 17 | #include "common/thread.h" | 17 | #include "common/thread.h" |
| 18 | #include "common/unique_function.h" | 18 | #include "common/unique_function.h" |
| 19 | 19 | ||
| @@ -47,7 +47,8 @@ public: | |||
| 47 | if (requests.empty()) { | 47 | if (requests.empty()) { |
| 48 | wait_condition.notify_all(); | 48 | wait_condition.notify_all(); |
| 49 | } | 49 | } |
| 50 | condition.wait(lock, stop_token, [this] { return !requests.empty(); }); | 50 | Common::CondvarWait(condition, lock, stop_token, |
| 51 | [this] { return !requests.empty(); }); | ||
| 51 | if (stop_token.stop_requested()) { | 52 | if (stop_token.stop_requested()) { |
| 52 | break; | 53 | break; |
| 53 | } | 54 | } |