summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/hooks/multiple.rb
blob: b1b659a5b6999ea928a5f8c5ed0a8cf7dcd36db0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'securerandom'

@mutex = Mutex.new

on_worker_boot do
    File.write("./cookie_worker_boot.#{SecureRandom.hex}", "worker booted")
end

on_thread_boot do
    @mutex.synchronize do
        File.write("./cookie_thread_boot.#{SecureRandom.hex}", "thread booted")
    end
end