diff options
Diffstat (limited to 'test/ruby/hooks/on_thread_shutdown.rb')
-rw-r--r-- | test/ruby/hooks/on_thread_shutdown.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/hooks/on_thread_shutdown.rb b/test/ruby/hooks/on_thread_shutdown.rb new file mode 100644 index 00000000..d953b8b7 --- /dev/null +++ b/test/ruby/hooks/on_thread_shutdown.rb @@ -0,0 +1,9 @@ +require 'securerandom' + +@mutex = Mutex.new + +on_thread_shutdown do + @mutex.synchronize do + File.write("./cookie_thread_shutdown.#{SecureRandom.hex}", "shutdown") + end +end |