Learn R Programming

Rdsm (version 1.1.0)

wait: wait

Description

Threads-like wait, signal

Usage

wait(waitvarname)
signal(waitvarname)
signal1(waitvarname)

Arguments

waitvarname
Wait variable, quoted.

Details

When a client calls wait() on the wait variable waitvarname(), Rdsm will add this client's ID to a list for that variable. The call will block. When another client later calls signal(), Rdsm will then release all the clients, i.e. their calls to wait() will unblock. If you wish to release just the first waiting client, use signal1().

One does not use newdsm to create a wait variable. Instead, the variable is automatically created the first time wait() is called on it.

A signal posted when no waits are pending will be ignored.

See Also

barr, lock, unlock, fa