diff --git a/aegisub/src/dialog_progress.cpp b/aegisub/src/dialog_progress.cpp index c860edc0a..01ba1b0fe 100644 --- a/aegisub/src/dialog_progress.cpp +++ b/aegisub/src/dialog_progress.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -38,8 +38,7 @@ using agi::dispatch::Main; class DialogProgressSink : public agi::ProgressSink { DialogProgress *dialog; - bool cancelled; - std::mutex cancelled_mutex; + std::atomic cancelled; public: DialogProgressSink(DialogProgress *dialog) @@ -65,12 +64,10 @@ public: } bool IsCancelled() { - std::lock_guard lock(cancelled_mutex); return cancelled; } void Cancel() { - std::lock_guard lock(cancelled_mutex); cancelled = true; }