You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
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:
@@ -2697,7 +2697,7 @@ bool DisplayServerX11::_wait_for_events() const {
|
||||
}
|
||||
|
||||
void DisplayServerX11::_poll_events() {
|
||||
while (!events_thread_done) {
|
||||
while (!events_thread_done.is_set()) {
|
||||
_wait_for_events();
|
||||
|
||||
// Process events from the queue.
|
||||
@@ -4279,7 +4279,7 @@ DisplayServerX11::~DisplayServerX11() {
|
||||
_clipboard_transfer_ownership(XA_PRIMARY, x11_main_window);
|
||||
_clipboard_transfer_ownership(XInternAtom(x11_display, "CLIPBOARD", 0), x11_main_window);
|
||||
|
||||
events_thread_done = true;
|
||||
events_thread_done.set();
|
||||
events_thread.wait_to_finish();
|
||||
|
||||
//destroy all windows
|
||||
|
||||
Reference in New Issue
Block a user