mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
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:
parent
86402934d3
commit
dd083e7687
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user