Skip to content

Commit 59b6940

Browse files
Remove dead code.
1 parent d1a5fc0 commit 59b6940

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

lib/async/container/group.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ def initialize(health_check_interval: 1.0)
3535

3636
# The running fibers, indexed by IO:
3737
@running = {}
38-
39-
# This queue allows us to wait for processes to complete, without spawning new processes as a result.
40-
@queue = nil
4138
end
4239

4340
# @returns [String] A human-readable representation of the group.
@@ -73,16 +70,11 @@ def empty?
7370

7471
# Sleep for at most the specified duration until some state change occurs.
7572
def sleep(duration)
76-
self.resume
77-
self.suspend
78-
7973
self.wait_for_children(duration)
8074
end
8175

8276
# Begin any outstanding queued processes and wait for them indefinitely.
8377
def wait
84-
self.resume
85-
8678
with_health_checks do |duration|
8779
self.wait_for_children(duration)
8880
end
@@ -256,28 +248,6 @@ def select(duration)
256248
return readable
257249
end
258250
end
259-
260-
def yield
261-
if @queue
262-
fiber = Fiber.current
263-
264-
@queue << fiber
265-
Fiber.yield
266-
end
267-
end
268-
269-
def suspend
270-
@queue ||= []
271-
end
272-
273-
def resume
274-
if @queue
275-
queue = @queue
276-
@queue = nil
277-
278-
queue.each(&:resume)
279-
end
280-
end
281251
end
282252
end
283253
end

0 commit comments

Comments
 (0)