diff options
| author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-02-10 19:22:13 +0100 |
|---|---|---|
| committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2021-02-18 17:12:46 +0100 |
| commit | 8e128726f0eac1982aa75a005554ee5b556b332e (patch) | |
| tree | 827c2f478e8fb3196ef411f4941fa4e839642e31 /editor/editor_node.h | |
| parent | 8870f43d742e0c48ae543d999856f5989170b62d (diff) | |
| download | redot-engine-8e128726f0eac1982aa75a005554ee5b556b332e.tar.gz | |
Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed
Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
Diffstat (limited to 'editor/editor_node.h')
| -rw-r--r-- | editor/editor_node.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_node.h b/editor/editor_node.h index 8068ca89ee..0493c6d4cb 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -31,6 +31,7 @@ #ifndef EDITOR_NODE_H #define EDITOR_NODE_H +#include "core/templates/safe_refcount.h" #include "editor/editor_data.h" #include "editor/editor_export.h" #include "editor/editor_folding.h" @@ -111,7 +112,7 @@ public: Thread execute_output_thread; Mutex execute_output_mutex; int exitcode = 0; - volatile bool done = false; + SafeFlag done; }; private: |
