Learn R Programming

bettermc (version 1.2.1)

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)

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.

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.

Windows Support

Not supported on Windows.

Lifecycle

[Experimental]