mirror of
https://github.com/vlang/v.git
synced 2025-09-08 14:51:53 -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 {
|
if idx >= ilen {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
res := cb(mut pool, idx, task_id)
|
||||||
lock pool.results {
|
lock pool.results {
|
||||||
pool.results[idx] = cb(mut pool, idx, task_id)
|
pool.results[idx] = res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pool.waitgroup.done()
|
pool.waitgroup.done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user