Skip to content
Browse files

Fix deadlock issue in signal handling of sleeping threads

  • Loading branch information...
1 parent 5a1b06e commit d8fcda59226dea69605740b172f06b96693ea4bb @dbussink dbussink committed Feb 6, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 vm/park.cpp
View
6 vm/park.cpp
@@ -18,10 +18,13 @@ namespace rubinius {
cond_.wait(mutex_);
}
+ mutex_.unlock();
if(!state->check_async(call_frame)) {
+ mutex_.lock();
result = NULL;
break;
}
+ mutex_.lock();
}
sleeping_ = false;
@@ -49,10 +52,13 @@ namespace rubinius {
break;
}
}
+ mutex_.unlock();
if(!state->check_async(call_frame)) {
+ mutex_.lock();
timeout = NULL;
break;
}
+ mutex_.lock();
}
sleeping_ = false;

0 comments on commit d8fcda5

Please sign in to comment.
Something went wrong with that request. Please try again.