Learn R Programming

Rdsm (version 1.1.0)

fa: fa

Description

Fetch-and-add function.

Usage

fa(fav,inc)

Arguments

fav
Fetch-and-add variable (Rdsm integer vector of length 1), name quoted.
inc
Increment value.

Details

When a client calls fa() on fav, the quantity inc (which could be negative) will be added to fav, atomically, i.e. without interference by another thread. The actual addition will be performed at the server, thus reducing communications costs.

See Also

barr, wait, signal