diff options
| author | 2021-04-06 04:23:02 +0200 | |
|---|---|---|
| committer | 2021-07-08 19:03:26 -0300 | |
| commit | a10e112e6436b30c9eb5ca2a82c94f83205bbc34 (patch) | |
| tree | c7f0a0fdbcd0d9db3e059af4491dac6a74eb6d8f /src/common/thread_worker.h | |
| parent | common/thread_worker: Use unique function (diff) | |
| download | yuzu-a10e112e6436b30c9eb5ca2a82c94f83205bbc34.tar.gz yuzu-a10e112e6436b30c9eb5ca2a82c94f83205bbc34.tar.xz yuzu-a10e112e6436b30c9eb5ca2a82c94f83205bbc34.zip | |
common/thread_worker: Fix data race
Diffstat (limited to 'src/common/thread_worker.h')
| -rw-r--r-- | src/common/thread_worker.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/thread_worker.h b/src/common/thread_worker.h index 7e2b04a07..12bbf5fef 100644 --- a/src/common/thread_worker.h +++ b/src/common/thread_worker.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <vector> | 11 | #include <vector> |
| 12 | #include <queue> | 12 | #include <queue> |
| 13 | 13 | ||
| 14 | #include "common/common_types.h" | ||
| 14 | #include "common/unique_function.h" | 15 | #include "common/unique_function.h" |
| 15 | 16 | ||
| 16 | namespace Common { | 17 | namespace Common { |
| @@ -29,6 +30,10 @@ private: | |||
| 29 | std::condition_variable condition; | 30 | std::condition_variable condition; |
| 30 | std::condition_variable wait_condition; | 31 | std::condition_variable wait_condition; |
| 31 | std::atomic_bool stop{}; | 32 | std::atomic_bool stop{}; |
| 33 | std::atomic<u64> work_scheduled{}; | ||
| 34 | std::atomic<u64> work_done{}; | ||
| 35 | std::atomic<u64> workers_stopped{}; | ||
| 36 | std::atomic<u64> workers_queued{}; | ||
| 32 | }; | 37 | }; |
| 33 | 38 | ||
| 34 | } // namespace Common | 39 | } // namespace Common |