Skip to content

Commit 1960275

Browse files
committed
Spider - make no kill mutex a re-entrant Monitor
1 parent 574ce21 commit 1960275

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/server/ruby/lib/sonicpi/runtime.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
require 'set'
4141
require 'ruby-beautify'
4242
require 'securerandom'
43+
require 'monitor'
4344
require 'active_support/core_ext/integer/inflections'
4445

4546

@@ -829,7 +830,7 @@ def __set_default_system_thread_locals!
829830
# over the alternative of a global no_kill mutex. Killing a Run
830831
# then essentially turns into waiting for each no_kill mutext for
831832
# every sub-in_thread before killing them.
832-
__system_thread_locals.set_local :sonic_pi_local_spider_no_kill_mutex, Mutex.new
833+
__system_thread_locals.set_local :sonic_pi_local_spider_no_kill_mutex, Monitor.new
833834

834835
# Reset subthreads thread local to the empty set. This shouldn't
835836
# be inherited from the parent thread.

0 commit comments

Comments
 (0)