Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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]'


bettermc

Enhanced Fork-Based Parallelization

v1.1.1
MIT + file LICENSE
Authors
Andreas Kersting [aut, cre, cph], GfK SE [cph], R Core team [ctb] ('etry()' and its print method borrow a lot from base R)
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.