boost.mutex: Create a boost.mutex object

Description Usage Arguments Value Author(s) See Also Examples

Description

This function creates a boost.mutex object.

Usage

1
boost.mutex(sharedName = NULL, timeout = NULL, create=TRUE)

Arguments

sharedName

The name of the shared resource corresponding to the mutex. By default a universal unique identifier is supplied.

timeout

The amount of time (in seconds) that the mutex should try to attempt to get a lock. By default no timeout is supplied and the mutex will attempt to acquire the lock indefinitely.

create

Should the mutex be created or are we attaching to an existing on. Default is TRUE.

Value

This function returns a boost.mutex object.

Author(s)

Michael J. Kane <bigmemoryauthors@gmail.com>

See Also

synchronicity

Examples

1
2
3
4
# Create a boost.mutex object with default resource name and no timeout.
x = boost.mutex()
rm(x)
gc()

Example output

         used (Mb) gc trigger (Mb) max used (Mb)
Ncells 338478 18.1     592000 31.7   460000 24.6
Vcells 581930  4.5    1308461 10.0   804425  6.2

synchronicity documentation built on May 2, 2019, 8:58 a.m.