Add some missing documentation to Queue#{close|deq} [ci skip]

Patch by Lars Kanis. [Fix GH-1949]

*  Describe the impact of Queue#close to Queue#deq .

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2018-09-16 02:45:16 +00:00
Родитель 4452e857d4
Коммит 18fe495902
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -799,10 +799,12 @@ queue_do_push(VALUE self, struct rb_queue *q, VALUE obj)
*
* - +close+ will be ignored.
*
* - calling enq/push/<< will raise an exception.
* - calling enq/push/<< will raise a +ClosedQueueError+.
*
* - when +empty?+ is false, calling deq/pop/shift will return an object
* from the queue as usual.
* - when +empty?+ is true, deq(false) will not suspend the thread and will return nil.
* deq(true) will raise a +ThreadError+.
*
* ClosedQueueError is inherited from StopIteration, so that you can break loop block.
*