semv {bettermc}R Documentation

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)

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.

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.

Windows Support

Not supported on Windows.

Lifecycle

options:
  alt='[Experimental]'


[Package bettermc version 1.1.2 Index]