aboutsummaryrefslogtreecommitdiffstats
path: root/bin/test_thread.rb
blob: 423a6b37519afa0292346c22e62a4ab916570ca6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env -S ruby -I lib -w
# frozen_string_literal: true

require 'net/gemini'

all_threads = []

100.times do
  all_threads << Thread.new(ARGV[0]) do |arg|
    response = Net::Gemini.get_response URI(arg)
    puts "#{response.status} - #{response.meta}"
  end
end

sleep 0.5 while Thread.list.length > 1