Method Signal():wait() Foundation
Waits until another thread triggers the signal
:wait( [<nTimeOut>], [<lReset>] ) --> lSignalled
The method returns .T. (true) when the thread is signalled. If the timeout interval elapses without a signal being triggered, the return value is .F. (false).
A thread enters a wait state when it executes the :wait() method. The thread remains active while waiting but it does not consume CPU resources. This is analogous to the Sleep() function which causes a thread - literally spoken - to "go to sleep", to "wake up again" when a time interval has elapsed, and to resume program execution. However, the length of the waiting period is not determined with the :wait()method. A thread leaves its wait state ("wakes up") as soon as another thread executes the :signal() method with the same Signal object, or when the timeout is reached. All threads using the same Signal object will leave their wait state once the signal is triggered by another thread (1:N relationship, N threads may wait while one thread signals).
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.