You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Remove NO_THREADS fallback code, Godot 4 requires thread support
This also removes `OS::can_use_threads` from the public API since it's always true.
This commit is contained in:
@@ -49,8 +49,6 @@ struct ThreadArrayProcessData {
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef NO_THREADS
|
||||
|
||||
template <class T>
|
||||
void process_array_thread(void *ud) {
|
||||
T &data = *(T *)ud;
|
||||
@@ -86,21 +84,4 @@ void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_us
|
||||
memdelete_arr(threads);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template <class C, class M, class U>
|
||||
void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_userdata) {
|
||||
ThreadArrayProcessData<C, U> data;
|
||||
data.method = p_method;
|
||||
data.instance = p_instance;
|
||||
data.userdata = p_userdata;
|
||||
data.index.set(0);
|
||||
data.elements = p_elements;
|
||||
for (uint32_t i = 0; i < p_elements; i++) {
|
||||
data.process(i);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // THREADED_ARRAY_PROCESSOR_H
|
||||
|
||||
Reference in New Issue
Block a user