mirror of
https://github.com/libretro/RetroArch
synced 2024-12-26 03:22:56 +00:00
apple: fix reinit of gcd task queue (#17262)
This commit is contained in:
parent
4d7dfd2848
commit
4351ea3098
@ -717,6 +717,8 @@ static void retro_task_gcd_wait(retro_task_condition_fn_t cond, void* data)
|
||||
|
||||
static void retro_task_gcd_init(void)
|
||||
{
|
||||
retro_task_t *task = NULL;
|
||||
|
||||
running_lock = slock_new();
|
||||
finished_lock = slock_new();
|
||||
property_lock = slock_new();
|
||||
@ -725,6 +727,12 @@ static void retro_task_gcd_init(void)
|
||||
|
||||
slock_lock(running_lock);
|
||||
worker_continue = true;
|
||||
for (task = tasks_running.front; task; task = task->next)
|
||||
{
|
||||
gcd_queue_count++;
|
||||
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0),
|
||||
^{ gcd_worker(task); });
|
||||
};
|
||||
slock_unlock(running_lock);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user