method

try_lock

ruby latest stable - Class: Mutex
try_lock()
public

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