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>
This commit is contained in:
parent
8870f43d74
commit
8e128726f0
58 changed files with 650 additions and 639 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "core/os/os.h"
|
||||
#include "core/os/semaphore.h"
|
||||
#include "core/os/thread.h"
|
||||
#include "core/templates/safe_refcount.h"
|
||||
|
||||
class _ResourceLoader : public Object {
|
||||
GDCLASS(_ResourceLoader, Object);
|
||||
|
|
@ -559,7 +560,7 @@ class _Thread : public Reference {
|
|||
protected:
|
||||
Variant ret;
|
||||
Variant userdata;
|
||||
volatile bool active = false;
|
||||
SafeFlag active;
|
||||
Object *target_instance = nullptr;
|
||||
StringName target_method;
|
||||
Thread thread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue