Skip to content

Commit

Permalink
Another test for resume.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 4, 2024
1 parent c612b22 commit 51fba51
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/io/event/selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,22 @@ def transfer
expect(result).to be(:success?)
end
end

with "#resume" do
it "can resume a fiber" do
other_fiber_count = 0

5.times do
fiber = Fiber.new do
other_fiber_count += 1
end

selector.resume(fiber)
end

expect(other_fiber_count).to be == 5
end
end
end

describe IO::Event::Selector do
Expand Down

0 comments on commit 51fba51

Please sign in to comment.