From 88402f1ea20add12aa741ad770a31525f1b91a90 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Wed, 24 Oct 2012 20:20:10 +0200 Subject: [PATCH] Ensure to unlock the thread object when running thread --- vm/objectmemory.cpp | 5 +++-- vm/signal.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/objectmemory.cpp b/vm/objectmemory.cpp index 6f60fb24d3..617044777a 100644 --- a/vm/objectmemory.cpp +++ b/vm/objectmemory.cpp @@ -974,6 +974,9 @@ namespace rubinius { CallFrame* call_frame = 0; utilities::thread::Thread::set_os_name("rbx.finalizer"); + GCTokenImpl gct; + state->vm()->thread->hard_unlock(state, gct); + // Forever for(;;) { FinalizeObject* fi; @@ -1028,8 +1031,6 @@ namespace rubinius { fi->status = FinalizeObject::eFinalized; } - GCTokenImpl gct; - state->checkpoint(gct, 0); } diff --git a/vm/signal.cpp b/vm/signal.cpp index e91cb29377..b74af1e34d 100644 --- a/vm/signal.cpp +++ b/vm/signal.cpp @@ -143,6 +143,8 @@ namespace rubinius { GCTokenImpl gct; utilities::thread::Thread::set_os_name("rbx.signal-dispatch"); + state->vm()->thread->hard_unlock(state, gct); + for(;;) { fd_set fds; FD_ZERO(&fds);