mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
23a8568739
commit
64926db998
3 changed files with 32 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue