summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-02-18 19:40:31 +0100
committerGitHub <noreply@github.com>2021-02-18 19:40:31 +0100
commit310496a89f583b49217915b9add165d51aea575e (patch)
treedbd3274dc1208ffe6c4a0ec99be0747f5d2d1cb1 /editor/editor_node.cpp
parent7eb4e6415d74e3d4dae6ddd12bb0bdb7acf221c0 (diff)
parent8e128726f0eac1982aa75a005554ee5b556b332e (diff)
downloadredot-engine-310496a89f583b49217915b9add165d51aea575e.tar.gz
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 8c03552981..ec8430e645 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5555,7 +5555,8 @@ static void _execute_thread(void *p_ud) {
eta->exitcode = err;
}
- eta->done = true;
+ eta->done.set();
+ ;
}
int EditorNode::execute_and_show_output(const String &p_title, const String &p_path, const List<String> &p_arguments, bool p_close_on_ok, bool p_close_on_errors) {
@@ -5569,13 +5570,12 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
eta.path = p_path;
eta.args = p_arguments;
eta.exitcode = 255;
- eta.done = false;
int prev_len = 0;
eta.execute_output_thread.start(_execute_thread, &eta);
- while (!eta.done) {
+ while (!eta.done.is_set()) {
{
MutexLock lock(eta.execute_output_mutex);
if (prev_len != eta.output.length()) {