[vm/concurrency] When waking up ThreadInterrupter first check if it is shutdown already.

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

Change-Id: Ic250ce6d23d20d0435447c4e3ba546c1755c0458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151024
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
Alexander Aprelev
2020-06-12 03:29:17 +00:00
committed by commit-bot@chromium.org
parent 0b64f54889
commit c1f0bc310d
+4
View File
@@ -146,6 +146,10 @@ void ThreadInterrupter::WakeUp() {
}
{
MonitorLocker ml(monitor_);
if (shutdown_) {
// Late call
return;
}
if (!initialized_) {
// Early call.
return;