Sha256: f730b2526549ac775d2dfeab2daa3d83297a80f232c0bc5252491a08c688dde3
Contents?: true
Size: 331 Bytes
Versions: 12
Compression:
Stored size: 331 Bytes
Contents
require 'thread' task_names = (1...100).map { |n| n.to_s } order_invoked = [] mutex = Mutex.new task_names.each { |task_name| task task_name do mutex.synchronize { order_invoked.push(task_name) } end } task :default => seq[*task_names] do unless order_invoked == task_names raise "seq failed" end end
Version data entries
12 entries across 12 versions & 1 rubygems