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:
@ -36,6 +36,7 @@
|
||||
#include "core/os/semaphore.h"
|
||||
#include "core/os/thread.h"
|
||||
#include "core/templates/ring_buffer.h"
|
||||
#include "core/templates/safe_refcount.h"
|
||||
#include "scene/resources/video_stream.h"
|
||||
#include "servers/audio_server.h"
|
||||
|
||||
@ -113,7 +114,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
|
||||
bool thread_eof = false;
|
||||
Semaphore *thread_sem;
|
||||
Thread thread;
|
||||
volatile bool thread_exit = false;
|
||||
SafeFlag thread_exit;
|
||||
|
||||
static void _streaming_thread(void *ud);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user