method

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.

lock()
public

Attempts to grab the lock and waits if it isn’t available. Raises ThreadError if mutex was locked by the current thread.