[vm] Don't wait for the idle timeout when the thread pool is shutting down.

TEST=time taskset --cpu-list 0 dart hello.dart
Bug: https://github.com/dart-lang/sdk/issues/47448
Change-Id: Iae3e8861bae4466d0f1aad7cf45707356ff7b98e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278665
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2023-01-10 17:46:38 +00:00 committed by Commit Queue
parent c7eb34d6aa
commit ab287309e5

View file

@ -286,6 +286,9 @@ void MutatorThreadPool::OnEnterIdleLocked(MonitorLocker* ml) {
return;
}
// Avoid shutdown having to wait for the timeout to expire.
if (ShuttingDownLocked()) return;
// Wait for the recommended idle timeout.
// We can be woken up because of a), b) or c)
const auto result =