[sgen] Lock around worker start, not only finishing
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 20 Feb 2017 16:11:52 +0000 (18:11 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 20 Feb 2017 16:11:52 +0000 (18:11 +0200)
commitc5efaeb4988cf0d0f3ec8579d637d48e4f743b42
tree6c4d04326c6c14461baa4832c7731d00533291ef
parent17c5a00c59613a7c5dbce76af5107a14c3e89f76
[sgen] Lock around worker start, not only finishing

If we don't take the finished_lock when starting workers, the workers that we started could have already finished the work and switch to non-parallel context before we are even able to signal all of them.
mono/sgen/sgen-workers.c