| 583 | |
| 584 | template <typename U> |
| 585 | Error run_task( |
| 586 | std::shared_ptr<TaskRunnerStruct> p_task_runner, |
| 587 | U p_userdata, |
| 588 | const String &p_description, |
| 589 | int progress_steps = -1, |
| 590 | bool p_can_cancel = false, |
| 591 | bool p_high_priority = false, |
| 592 | bool p_progress_enabled = true) { |
| 593 | bool is_singlethreaded = GDREConfig::get_singleton()->get_setting("force_single_threaded", false); |
| 594 | auto task_id = add_task(p_task_runner, p_userdata, p_description, progress_steps, p_can_cancel, p_high_priority, p_progress_enabled, is_singlethreaded); |
| 595 | return wait_for_task_completion(task_id); |
| 596 | } |
| 597 | |
| 598 | template <typename C, typename M, typename U> |
| 599 | bool dispatch_to_main_thread(C *p_instance, M p_method, U p_userdata) { |
no test coverage detected