summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/hooks/on_thread_boot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/hooks/on_thread_boot.rb')
-rw-r--r--test/ruby/hooks/on_thread_boot.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/hooks/on_thread_boot.rb b/test/ruby/hooks/on_thread_boot.rb
index 1e05e248..4f88424e 100644
--- a/test/ruby/hooks/on_thread_boot.rb
+++ b/test/ruby/hooks/on_thread_boot.rb
@@ -1,5 +1,9 @@
require 'securerandom'
+@mutex = Mutex.new
+
on_thread_boot do
- File.write("./cookie_thread_boot.#{SecureRandom.hex}", "booted")
+ @mutex.synchronize do
+ File.write("./cookie_thread_boot.#{SecureRandom.hex}", "booted")
+ end
end