1require 'securerandom' 2 3@mutex = Mutex.new 4 5on_worker_boot do 6 File.write("./cookie_worker_boot.#{SecureRandom.hex}", "worker booted") 7end 8 9on_thread_boot do 10 @mutex.synchronize do 11 File.write("./cookie_thread_boot.#{SecureRandom.hex}", "thread booted") 12 end 13end 14