mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
Correct WorkDelegate::DoWork race condition with an atomic_bool.
Bug:crashpad:380 Change-Id: Iae523f22366ca65816c42b499bd482056efb5bca Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3244729 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
parent
0118cc44aa
commit
aaed581a53
@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_UTIL_THREAD_WORKER_THREAD_H_
|
||||
#define CRASHPAD_UTIL_THREAD_WORKER_THREAD_H_
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include "util/synchronization/semaphore.h"
|
||||
@ -95,7 +96,7 @@ class WorkerThread {
|
||||
Delegate* delegate_; // weak
|
||||
std::unique_ptr<internal::WorkerThreadImpl> impl_;
|
||||
bool running_;
|
||||
bool do_work_now_;
|
||||
std::atomic_bool do_work_now_;
|
||||
};
|
||||
|
||||
} // namespace crashpad
|
||||
|
Loading…
x
Reference in New Issue
Block a user