sync.pool: restore the parallel operation (surrounding the cb call in process_in_thread in a lock in 1b52538, effectively disabled parallelism)

This commit is contained in:
Delyan Angelov 2025-03-25 09:16:43 +02:00
parent 86402934d3
commit dd083e7687
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -117,8 +117,9 @@ fn process_in_thread(mut pool PoolProcessor, task_id int) {
if idx >= ilen {
break
}
res := cb(mut pool, idx, task_id)
lock pool.results {
pool.results[idx] = cb(mut pool, idx, task_id)
pool.results[idx] = res
}
}
pool.waitgroup.done()