sync: protect against sporadic failing tests in macos
parent
ee6f2f84bb
commit
8df265a581
|
@ -135,6 +135,9 @@ fn process_in_thread(pool mut PoolProcessor, task_id int) {
|
||||||
idx = pool.ntask
|
idx = pool.ntask
|
||||||
pool.ntask++
|
pool.ntask++
|
||||||
pool.ntask_mtx.unlock()
|
pool.ntask_mtx.unlock()
|
||||||
|
if idx >= ilen {
|
||||||
|
break
|
||||||
|
}
|
||||||
pool.results[idx] = cb(pool, idx, task_id)
|
pool.results[idx] = cb(pool, idx, task_id)
|
||||||
}
|
}
|
||||||
pool.waitgroup.done()
|
pool.waitgroup.done()
|
||||||
|
|
Loading…
Reference in New Issue