MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / wait_update_progress

Method wait_update_progress

utility/task_manager.cpp:98–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98bool TaskManager::BaseTemplateTaskData::wait_update_progress(bool p_force_refresh) {
99 bool bg_ret = false;
100 if (not_in_main_queue && progress_enabled) {
101 update_progress(false);
102 }
103 if (Thread::is_main_thread()) {
104 bg_ret = TaskManager::get_singleton()->wait_until_next_frame();
105 } else {
106 bg_ret = TaskManager::get_singleton()->is_current_task_canceled();
107 if (!bg_ret) {
108 OS::get_singleton()->delay_usec(10000);
109 }
110 }
111 // Only use the cancel value if the progress is not enabled
112 if (!progress_enabled && bg_ret && !is_canceled()) {
113 cancel();
114 }
115
116 return is_canceled();
117}
118
119String TaskManager::BaseTemplateTaskData::_get_task_description() {
120 if (is_canceled()) {

Callers

nothing calls this directly

Calls 2

wait_until_next_frameMethod · 0.80

Tested by

no test coverage detected