Learn R Programming

bettermc (version 1.2.1)

semv: POSIX-style System V Semaphores

Description

Mimic the POSIX semaphore API with System V semaphores.

Usage

semv_open(value = 0)

semv_post(sid, undo = TRUE)

semv_wait(sid, undo = TRUE)

semv_unlink(sid)

Value

For semv_open, an object of class "semv", which is an integer referring to the System V semaphore. All other functions return NULL

invisibly and are called for their side effects.

Arguments

value

the initial value of the semaphore to create (>= 0).

sid

the semaphore id as returned by semv_open.

undo

should the operations (decrement/increment) on the semaphore be undone on process termination. This feature is probably the main reason to prefer System V semaphores to POSIX ones.

Windows Support

Not supported on Windows.

Lifecycle

[Experimental]