Skip to content

Commit

Permalink
[Truffle] Fix typo and move comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Dec 1, 2016
1 parent 8fbb98c commit e820f0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/ruby/truffle/truffle/thread.rb
Expand Up @@ -54,6 +54,8 @@ class ConditionVariable
# Creates a new ConditionVariable
#
def initialize
# Truffle: this Hash must never need a guest-language safepoint, or threads
# will get stuck while acquiring the Mutex in interrupt-never mode below.
@waiters = {}
@waiters_mutex = Mutex.new
end
Expand All @@ -75,9 +77,6 @@ def wait(mutex, timeout=nil)
end
ensure
@waiters_mutex.synchronize do
# Truffle: this Hash must never need a guest-language safepoint,
# or threads will get struck while acquiring the Mutex in
# interrupt-never mode.
@waiters.delete(Thread.current)
end
end
Expand Down

0 comments on commit e820f0f

Please sign in to comment.