[vm/gc] Ensure to tear down mutator pool of an isolate group before waiting for pending GC tasks

The mutator thread pool can, when it becomes idle, cause idle
notifaction, which can cause GC.

So we should turn down the mutator thread pool before waiting for
outstanding GC tasks.

See b/157612890

Fixes https://github.com/dart-lang/sdk/issues/42098

Change-Id: I1645252377ff07763eef1a00f9c1edff95e34f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149296
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>

https://dart.googlesource.com/sdk/+/764ebab40467880916977904fed84120e3ad0ef1
1 file changed
tree: 4461171c5cfaa23d628d45b01664e0a5593f66dc
  1. commits.json