[DOC] Improve Thread::Queue.new docs [ci skip]
This commit is contained in:
parent
ac5d6faea8
commit
0fcc58a18c
Notes:
git
2021-12-15 11:25:53 +09:00
Merged: https://github.com/ruby/ruby/pull/5273 Merged-By: nobu <nobu@ruby-lang.org>
@ -838,14 +838,26 @@ queue_closed_result(VALUE self, struct rb_queue *q)
|
|||||||
/*
|
/*
|
||||||
* Document-method: Queue::new
|
* Document-method: Queue::new
|
||||||
*
|
*
|
||||||
* Creates a new queue instance, optionally using the contents of an Enumerable
|
* call-seq:
|
||||||
|
* Thread::Queue.new -> empty_queue
|
||||||
|
* Thread::Queue.new(enumerable) -> queue
|
||||||
|
*
|
||||||
|
* Creates a new queue instance, optionally using the contents of an +enumerable+
|
||||||
* for its initial state.
|
* for its initial state.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
* q = Thread::Queue.new
|
* q = Thread::Queue.new
|
||||||
* q = Thread::Queue.new([a, b, c])
|
* #=> #<Thread::Queue:0x00007ff7501110d0>
|
||||||
* q = Thread::Queue.new(items)
|
* q.empty?
|
||||||
|
* #=> true
|
||||||
|
*
|
||||||
|
* q = Thread::Queue.new([1, 2, 3])
|
||||||
|
* #=> #<Thread::Queue:0x00007ff7500ec500>
|
||||||
|
* q.empty?
|
||||||
|
* #=> false
|
||||||
|
* q.pop
|
||||||
|
* #=> 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user