Skip to content

Commit

Permalink
Make Console request thread GC dependent at exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Oct 3, 2014
1 parent 6580094 commit 6c8237f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vm/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ namespace rubinius {
}
}

state->gc_dependent(gct, 0);

RUBINIUS_THREAD_STOP(const_cast<RBX_DTRACE_CONST char*>(thread_name),
state->vm()->thread_id(), 1);
}
Expand Down Expand Up @@ -357,7 +359,6 @@ namespace rubinius {
while(!response_exit_) {
{
utilities::thread::Mutex::LockGuard lg(list_lock_);
GCIndependent guard(state, 0);

if(request_list_->size() > 0) {
request = request_list_->back();
Expand Down Expand Up @@ -386,6 +387,9 @@ namespace rubinius {
utilities::thread::Mutex::LockGuard lg(response_lock_);
GCIndependent guard(state, 0);

atomic::memory_barrier();
if(response_exit_) break;

response_cond_.wait(response_lock_);
}
}
Expand Down

0 comments on commit 6c8237f

Please sign in to comment.