Fixup! Use spinlock for better performance

This commit is contained in:
tarsin committed 2023-04-29 17:18:30 +08:00
1 parent dcbc79fd80
commit 797182fbf8
1 file changed
+1 -1
+1 -1
View File
@@ -263,7 +263,7 @@ static int archive_get_ctx(archive_ctx **ctxptr, int idx) {
}
if (replace) ctx_pool[victimIdx] = ctx;
pthread_spin_unlock(&ctx_lock);
archive_release_ctx(victimCtx);
if (replace) archive_release_ctx(victimCtx);
}
ret = archive_skip_to_index(ctx, idx);
if (ret != idx) {