From d9a45b677e559457bdef2118cd2829cce67501fa Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sun, 16 Sep 2007 20:42:15 +0000 Subject: * 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 --- ext/thread/thread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/thread') 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; -- cgit v1.2.3