summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-16 20:42:15 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-16 20:42:15 +0000
commitd9a45b677e559457bdef2118cd2829cce67501fa (patch)
tree6e4ecb0fde729d02bb78607316057119283ed679 /ext
parent0b01850bdc36f6d24a4fdc43ae2051e1fb3f86be (diff)
* ext/thread/thread.c (lock_mutex): should take care of threads
not waiting any longer; there cases of a thread raising exceptions. [ ruby-Bugs-11901 ] * test/thread/test_thread.rb (test_mutex_exception_handling): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/thread/thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index 43dfc348ed..3dba9ba32a 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -422,9 +422,8 @@ lock_mutex(Mutex *mutex)
mutex->owner = current;
}
else {
- push_list(&mutex->waiting, current);
do {
- rb_thread_stop();
+ wait_list(&mutex->waiting);
rb_thread_critical = 1;
if (!MUTEX_LOCKED_P(mutex)) {
mutex->owner = current;