Skip to content

Commit

Permalink
Ensure to unlock the thread object when running thread
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Oct 24, 2012
1 parent fcaf1f9 commit 88402f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vm/objectmemory.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -1028,8 +1031,6 @@ namespace rubinius {
fi->status = FinalizeObject::eFinalized;
}

GCTokenImpl gct;

state->checkpoint(gct, 0);
}

Expand Down
2 changes: 2 additions & 0 deletions vm/signal.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 88402f1

Please sign in to comment.