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

sem

Named POSIX Semaphores


Description

Named POSIX Semaphores

Usage

sem_open(name, create = FALSE, overwrite = FALSE, value = 0)

sem_post(sem)

sem_wait(sem)

sem_close(sem)

sem_unlink(name)

Arguments

name

the name of the semaphore. Consult man sem_overview for what makes a valid name.

create

should the semaphore be created if it currently does not exist?

overwrite

if create == TRUE, should we overwrite an already existing semaphore with the name (TRUE) or rather fail (FALSE).

value

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

sem

an object as returned by sem_open.

Value

For sem_open, an object of class "sem", which is an external pointer to the POSIX 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.