Skip to content

Commit aae55f9

Browse files
committed
Add early check to avoid extra synchronization for Timeout
1 parent 1c3ecb1 commit aae55f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/truffle/timeout.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def self.ensure_timeout_thread_running
131131
def self.add_timeout(time, exc, message)
132132
r = TimeoutRequest.new(time, Thread.current, exc, message)
133133
@chan << r
134-
ensure_timeout_thread_running
134+
ensure_timeout_thread_running unless defined?(@controller)
135135
r
136136
end
137137

0 commit comments

Comments
 (0)