summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/hooks/on_thread_shutdown.rb
blob: d953b8b7e04821840470ab82bf56397fed49332a (plain) (blame)
1
2
3
4
5
6
7
8
9
require 'securerandom'

@mutex = Mutex.new

on_thread_shutdown do
    @mutex.synchronize do
        File.write("./cookie_thread_shutdown.#{SecureRandom.hex}", "shutdown")
    end
end