mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-17 00:07:44 +00:00
Merge pull request #2943 from sronsse/fixes_for_team
Fix deadlock due to missing slock_unlock in task threaded find function.
This commit is contained in:
commit
dce7730928
@ -270,16 +270,20 @@ static bool retro_task_threaded_find(
|
||||
retro_task_finder_t func, void *user_data)
|
||||
{
|
||||
retro_task_t *task = NULL;
|
||||
bool result = false;
|
||||
|
||||
slock_lock(running_lock);
|
||||
for (task = tasks_running.front; task; task = task->next)
|
||||
{
|
||||
if (func(task, user_data))
|
||||
return true;
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
slock_unlock(running_lock);
|
||||
|
||||
return false;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void threaded_worker(void *userdata)
|
||||
|
@ -1393,8 +1393,12 @@ static void cb_generic_download(void *task_data,
|
||||
|
||||
if (string_is_equal_noncase(file_ext, "zip"))
|
||||
{
|
||||
rarch_task_push_decompress(output_path, dir_path, NULL, NULL, NULL,
|
||||
cb_decompressed, (void*)(uintptr_t)transf->type_hash);
|
||||
if (!rarch_task_push_decompress(output_path, dir_path, NULL, NULL, NULL,
|
||||
cb_decompressed, (void*)(uintptr_t)transf->type_hash))
|
||||
{
|
||||
err = "Decompression failed.";
|
||||
goto finish;
|
||||
}
|
||||
}
|
||||
#else
|
||||
switch (transf->type_hash)
|
||||
|
Loading…
x
Reference in New Issue
Block a user