Sha256: 108944f8e15c06f7ae81e55aa6138077a11f9b5de06bbb2a26a861d8c82bf549

Contents?: true

Size: 241 Bytes

Versions: 2

Compression:

Stored size: 241 Bytes

Contents

# frozen_string_literal: true

require_relative '../lib/tty-command'

cmd = TTY::Command.new

threads = []
3.times do |i|
  th = Thread.new do
    10.times { cmd.run("echo th#{i}; sleep 0.1") }
  end
  threads << th
end
threads.each(&:join)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tty-command-0.9.0 examples/threaded.rb
tty-command-0.8.2 examples/threaded.rb