[PATCH] thread: fix deadlock/freeze on SizedQueue#push
SizedQueue#push needs to check the thread list for threads
waiting on enqueue. Checking the wrong thread list leads
strange/surprising behavior when the the queue is full.
This needs to be backported to 2.1.0 (not 2.0.0 or earlier)
ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
test/thread/test_queue.rb: add test
#1 Updated by Charlie Somerville about 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100