diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-16 02:45:16 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-16 02:45:16 +0000 |
commit | 18fe49590218acd408caabfe271da09f25cb2e68 (patch) | |
tree | 22a22112d41d3a4ea105e8bd91feb01a564acaac /thread_sync.c | |
parent | 4452e857d4bb721cfeb74f9b69a94e5a194527db (diff) |
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
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c index 5244d9f3c9..b79db1fee3 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -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. * |