[neurun] Use noWaitingJobs in ParallelExecutor and fix wait in its executeImpl (...
authorДилшоджон Умронхонович Пошшоев/AI Tools Lab /SRR/Engineer/삼성전자 <d.poshshoev@samsung.com>
Tue, 16 Jul 2019 10:41:55 +0000 (19:41 +0900)
committer이한종/On-Device Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Tue, 16 Jul 2019 10:41:55 +0000 (19:41 +0900)
commit250fb9581a94313c15cd805c337982c6fed956cb
tree1cbfb128467c748b3dd77df91fa4803818f1ac95
parentbfdab3c2c5cf449f4ec3dcbec005ca2036d9bdca
[neurun] Use noWaitingJobs in ParallelExecutor and fix wait in its executeImpl (#5657)

Waiting just for `!_ready_jobs.empty()` is wrong, because when wait returns false
and unlocks the lock, some other thread may finish the waiting jobs and
`_ready_jobs` may never been inserted

Signed-off-by: Dilshodzhon Poshshoev <d.poshshoev@samsung.com>
runtimes/neurun/core/src/exec/ParallelExecutor.cc