mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 12:42:49 +00:00
Ensure events::call_in_main_thread is thread-safe
(cherry-picked from commit b70463b6adbeb235ba24da315627c5dba79b5e75)
This commit is contained in:
parent
a5e447a438
commit
58880c8453
@ -53,7 +53,7 @@ struct invoked_function_data
|
||||
const std::function<void(void)>& f;
|
||||
|
||||
/** Whether execution in the main thread is complete. */
|
||||
bool finished = false;
|
||||
std::atomic_bool finished = false;
|
||||
|
||||
/** Stores any exception thrown during the execution of @ref f. */
|
||||
std::exception_ptr thrown_exception;
|
||||
|
Loading…
x
Reference in New Issue
Block a user