summaryrefslogtreecommitdiff
path: root/ext/thread
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-13 03:18:38 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-13 03:18:38 +0000
commit64926db998b94189eb7d61d7d924ae69f25c205c (patch)
treefab651293e56f8976c27ab5387c7ae97642d6505 /ext/thread
parent23a85687398e0fc620c07ca87237d9b384cee53e (diff)
* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong. [Bug #9302] [ruby-core:59324] * test/thread/test_queue.rb: add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/thread')
-rw-r--r--ext/thread/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
index b8be5d883ff..208d1172dfb 100644
--- a/ext/thread/thread.c
+++ b/ext/thread/thread.c
@@ -459,7 +459,7 @@ static VALUE
rb_szqueue_push(VALUE self, VALUE obj)
{
struct waiting_delete args;
- args.waiting = GET_QUEUE_WAITERS(self);
+ args.waiting = GET_SZQUEUE_WAITERS(self);
args.th = rb_thread_current();
while (queue_length(self) >= GET_SZQUEUE_ULONGMAX(self)) {