diff --git a/src/machine.cpp b/src/machine.cpp index 0e2e9ba3f1..5391af5e86 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -1447,7 +1447,8 @@ makeArrayClass(Thread* t, object spec) void removeMonitor(Thread* t, object o) { - expect(t, t->state == Thread::ExclusiveState); + expect(t, t->state == Thread::ExclusiveState + or t->state == Thread::ExitState); unsigned hash; if (DebugMonitors) {