Skip to content

Commit

Permalink
WIP: try without threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Flink committed May 29, 2024
1 parent b80115d commit 4557761
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions spec/helpers/url_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ def get(path)
end

def flood_get(path, times:)
threads = []

times.times do
threads << Thread.new do
response = get(path)
yield response if block_given?
end
response = get(path)
yield response if block_given?
end

threads.each(&:join)
end
end

0 comments on commit 4557761

Please sign in to comment.