Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > wait() |  |

wait()

Syntax

    wait(whichObject)

Description

Multiuser Server server-side command; blocks the current thread from executing until another thread issues the `notify()` command for the given data object. `Wait()` and `notify()` are used to share data between threads while preventing more than one thread from reading or writing to the object at the same time.

Example

This statement causes the current thread to stop executing until another thread issues a notify command on the list variable `sharedList`:

    wait(sharedList)

See also

`notify()`, `notifyAll()`, `lock()`, `unlock()`