mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 18:43:29 -05:00
Force get_thread_count()
to 1
if single threaded
This commit is contained in:
parent
fd4c29a189
commit
4988fa1ece
1 changed files with 7 additions and 1 deletions
|
@ -258,7 +258,13 @@ public:
|
|||
bool is_group_task_completed(GroupID p_group) const;
|
||||
void wait_for_group_task_completion(GroupID p_group);
|
||||
|
||||
_FORCE_INLINE_ int get_thread_count() const { return threads.size(); }
|
||||
_FORCE_INLINE_ int get_thread_count() const {
|
||||
#ifdef THREADS_ENABLED
|
||||
return threads.size();
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static WorkerThreadPool *get_singleton() { return singleton; }
|
||||
static int get_thread_index();
|
||||
|
|
Loading…
Reference in a new issue