mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix thread sanitizer errors in iothread
This uses an atomic bool for main_thread_request_t::done. Fixes #3895
This commit is contained in:
parent
4284e58033
commit
1413e20ed4
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <atomic>
|
||||
|
||||
#include <condition_variable>
|
||||
#include <queue>
|
||||
|
@ -50,7 +51,7 @@ struct spawn_request_t {
|
|||
};
|
||||
|
||||
struct main_thread_request_t {
|
||||
volatile bool done = false;
|
||||
std::atomic<bool> done{false};
|
||||
void_function_t func;
|
||||
|
||||
main_thread_request_t(void_function_t &&f) : func(f) {}
|
||||
|
|
Loading…
Reference in a new issue