summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-31 15:24:56 +0100
committerGitHub <noreply@github.com>2021-01-31 15:24:56 +0100
commit5525cd85c60455b0bb9716bbef0ad2ad8111d752 (patch)
tree52ff0e2d3e01dd2655feff1cf88f07e10d84aad1 /editor/editor_node.cpp
parent02eb11450b4151b02db861b5029783e52e16c603 (diff)
parent99fe462452be44efa618e83ad9bbecd722ae6ecd (diff)
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index e24cda1932..040f1b1640 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5494,9 +5494,7 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
int prev_len = 0;
- eta.execute_output_thread = Thread::create(_execute_thread, &eta);
-
- ERR_FAIL_COND_V(!eta.execute_output_thread, 0);
+ eta.execute_output_thread.start(_execute_thread, &eta);
while (!eta.done) {
{
@@ -5511,8 +5509,7 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
OS::get_singleton()->delay_usec(1000);
}
- Thread::wait_to_finish(eta.execute_output_thread);
- memdelete(eta.execute_output_thread);
+ eta.execute_output_thread.wait_to_finish();
execute_outputs->add_text("\nExit Code: " + itos(eta.exitcode));
if (p_close_on_errors && eta.exitcode != 0) {