Mimic the POSIX semaphore API with System V semaphores.
semv_open(value = 0)semv_post(sid, undo = TRUE)
semv_wait(sid, undo = TRUE)
semv_unlink(sid)
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.
the initial value of the semaphore to create (>= 0
).
the semaphore id as returned by semv_open
.
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.
Not supported on Windows.