Skip to content

Commit e385357

Browse files
Fix missing documentation.
1 parent f7b4768 commit e385357

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

lib/async/list.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def to_s
1818
sprintf("#<%s:0x%x size=%d>", self.class.name, object_id, @size)
1919
end
2020

21+
# @returns [String] A short summary of the list.
2122
alias inspect to_s
2223

2324
# Fast, safe, unbounded accumulation of children.
@@ -238,6 +239,12 @@ class Node
238239
attr_accessor :head
239240
attr_accessor :tail
240241

242+
# @returns [String] A string representation of the node.
243+
def to_s
244+
sprintf("#<%s:0x%x>", self.class.name, object_id)
245+
end
246+
247+
# @returns [String] A string representation of the node.
241248
alias inspect to_s
242249
end
243250

lib/async/node.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def to_s
180180
"\#<#{self.description}>"
181181
end
182182

183+
# @returns [String] A description of the node.
183184
alias inspect to_s
184185

185186
# Change the parent of this node.

lib/async/queue.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def initialize(limit = 1, full: Notification.new, **options)
147147
# @attribute [Integer] The maximum number of items that can be enqueued.
148148
attr :limit
149149

150+
# Close the queue, causing all waiting tasks to return `nil`. Any subsequent calls to {enqueue} will raise an exception.
151+
# Also signals all tasks waiting for the queue to be full.
150152
def close
151153
super
152154

lib/async/scheduler.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ def async(*arguments, **options, &block)
591591
return task
592592
end
593593

594+
# Create a new fiber and return it without starting execution.
595+
# @returns [Fiber] The fiber that was created.
594596
def fiber(...)
595597
return async(...).fiber
596598
end

0 commit comments

Comments
 (0)