Learn R Programming

Rdsm (version 1.0.0)

wait: wait

Description

Threads-like wait, signal

Usage

wait(waitvarname)
signal(waitvarname)

Arguments

waitvarname
Wait variable, quoted.

Details

When a client calls wait on waitvarname, Rdsm will add this client's ID to a list. 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.

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