instance method
Thread::Mutex#locked?
() -> bool
mutex.locked? → true or false
thread_sync.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/thread_sync.rb, line 83
def locked?
Primitive.cexpr! %q{ RBOOL(mutex_locked_p(mutex_ptr(self))) }
end
Returns true if this lock is currently held by some thread.