mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +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)
|
static void retro_task_gcd_init(void)
|
||||||
{
|
{
|
||||||
|
retro_task_t *task = NULL;
|
||||||
|
|
||||||
running_lock = slock_new();
|
running_lock = slock_new();
|
||||||
finished_lock = slock_new();
|
finished_lock = slock_new();
|
||||||
property_lock = slock_new();
|
property_lock = slock_new();
|
||||||
@ -725,6 +727,12 @@ static void retro_task_gcd_init(void)
|
|||||||
|
|
||||||
slock_lock(running_lock);
|
slock_lock(running_lock);
|
||||||
worker_continue = true;
|
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);
|
slock_unlock(running_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user