aboutsummaryrefslogtreecommitdiffstats
path: root/bin/test_thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bin/test_thread.rb')
-rwxr-xr-xbin/test_thread.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/test_thread.rb b/bin/test_thread.rb
new file mode 100755
index 0000000..423a6b3
--- /dev/null
+++ b/bin/test_thread.rb
@@ -0,0 +1,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