Group "Waitings"
Wating functions and methods.
All the functions and methods meant to wait for any Synchronization Structure (or more in general, for any waitable object) share a common semantic which has the following characteristics:
- Waiting functions can wait on one or more waitable objects to become available for acquisition.
- Waiting functions have an optional timeout value. If it's not specified, or if it's less than zero, then the wait functions will wait forever that one of the waited items can be acquired. If it's zero, they will check if one of the waited items is currently available, and return immediately (eventually acquiring the item). If it's greater than zero, they will wait for the specified amount of seconds and fractions, and return nil if the waited items are not ready to be acquired by the expiration time.
- A succesful wait consists in the acquisition of the waitable item. Acquisition may not be exclusive; some waitable items may be acquired by more threads.
- In case of a failed wait, nil is returned.
- All the waiting functions in this group respect the VM Interruption protocol; they may raise an InterruptedError if thir thread receives a Thread.stop request or a VM interruption request generated by other modules or embedding applications.
Contents
Thread.vwait | Wait for one or more synchronization strucures to become available. |
Thread.wait | Wait for one or more synchronization strucures to become available. |
Threading.vwait | Wait for one or more synchronization strucures to become available. |
Threading.wait | Wait for one or more synchronization strucures to become available. |