Sha256: 3c8c258cc648aa7bff48ecbad5638ed44772296a3cd74532a216e0fe61582144
Contents?: true
Size: 488 Bytes
Versions: 4
Compression:
Stored size: 488 Bytes
Contents
require_relative '../../lib/tty-progressbar' bars = TTY::ProgressBar::Multi.new("main [:bar] :percent") bar1 = bars.register "foo [:bar] :percent", total: 150 bar2 = bars.register "bar [:bar] :percent", total: 250 bar3 = bars.register "baz [:bar] :percent", total: 100 th1 = Thread.new { 15.times { sleep(0.1); bar1.advance(10) } } th2 = Thread.new { 50.times { sleep(0.1); bar2.advance(5)} } th3 = Thread.new { 50.times { sleep(0.1); bar3.advance(5) } } [th1, th2, th3].each(&:join)
Version data entries
4 entries across 4 versions & 1 rubygems