ipcmutex: Inter-process locks

Description Usage Arguments Value Examples

Description

Inter-process locks

Usage

1
2
3
4
5
6
7
locked(id)

lock(id)

try_lock(id)

unlock(id)

Arguments

id

character(1) identifying the lock to be obtained.

Value

locked() returns TRUE when mutex is locked, and FALSE otherwise.

lock() creates a named lock, returning TRUE on success.

trylock() returns TRUE if the lock is obtained, FALSE otherwise.

unlock() returns TRUE on success, FALSE (e.g., because there is nothing to unlock) otherwise.

Examples

1
2
3
4
5
6
7
8
9
id <- ipcid("mtx-example")

lock(id)
try_lock(id)
unlock(id)
try_lock(id)
locked(id)

ipcremove(id)

mtmorgan/IPCMutex documentation built on May 23, 2019, 9:34 a.m.