[sgen] Make job waiting reliable
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 27 Jun 2017 20:52:04 +0000 (23:52 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Wed, 28 Jun 2017 10:12:06 +0000 (13:12 +0300)
commit5599130b36917ec7f5cc9a5c755a4f441a65efa0
tree0a90b30f962d637927d8070ce0f7ea79c2c8a539
parent71c58f8fb0ac857440424c229963574ef243ca30
[sgen] Make job waiting reliable

While this is not an issue yet, sgen_thread_pool_wait_for_all_jobs is logically expected to be called by the main thread and resume execution after all jobs have been executed. Concurrent M&S can enqueue additional jobs as part of its finishing phase, which means that we could detect early that no more jobs are to be processed. Make sure this is not the case.
mono/sgen/sgen-workers.c