summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c4
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.
*