method
sleep
v2_2_9 -
Show latest stable
-
0 notes -
Class: Mutex
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (21)
- 2_2_9 (0)
- 2_4_6
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
sleep(p1 = v1)
public
Releases the lock and sleeps timeout seconds if it is given and non-nil or forever. Raises ThreadError if mutex wasn’t locked by the current thread.
When the thread is next woken up, it will attempt to reacquire the lock.
Note that this method can wakeup without explicit Thread#wakeup call. For example, receiving signal and so on.