method

try_lock

ruby latest stable - Class: Thread::Mutex

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_4_6) is shown here.

try_lock()
public

Attempts to obtain the lock and returns immediately. Returns true if the lock was granted.