Sha256: 80076799f91aaa4316315808787d32e5966a9885c62527520cbc35b1661a2910

Contents?: true

Size: 518 Bytes

Versions: 5

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

require_relative "../../lib/tty-spinner"

spinners = TTY::Spinner::Multi.new "[:spinner] main", format: :pulse

sp1 = spinners.register "[:spinner] one", format: :classic
sp2 = spinners.register "[:spinner] two", format: :classic
sp3 = spinners.register "[:spinner] three", format: :classic

th1 = Thread.new { 20.times { sleep(0.2); sp1.spin } }
th2 = Thread.new { 30.times { sleep(0.1); sp2.spin } }
th3 = Thread.new { 10.times { sleep(0.3); sp3.spin } }

[th1, th2, th3].each(&:join)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
planter-cli-3.0.7 lib/tty-spinner/examples/multi/basic_top_level.rb
planter-cli-3.0.5 lib/tty-spinner/examples/multi/basic_top_level.rb
planter-cli-3.0.4 lib/tty-spinner/examples/multi/basic_top_level.rb
planter-cli-3.0.3 lib/tty-spinner/examples/multi/basic_top_level.rb
planter-cli-3.0.2 lib/tty-spinner/examples/multi/basic_top_level.rb