Learn R Programming

synchronicity (version 1.3.10)

is.timed: Timeout operations for boost.mutex objects

Description

The is.timed function tells if a boost.mutex object has a timeout. The timeout function tells how long a mutex will wait for a timeout.

Usage

is.timed(m)

# S4 method for boost.mutex is.timed(m)

Value

is.timed returns TRUE if the object has a timeout and FALSE otherwise. If a timeout has been set timeout returns the number of seconds a boost.mutex object will attempt to acquire a lock and NULL otherwise.

Arguments

m

a boost.mutex object to get timeout information for.

Examples

Run this code
x = boost.mutex(timeout=5)
y = boost.mutex()
print(is.timed(x))
print(is.timed(y))
print(timeout(x))
print(timeout(y))

Run the code above in your browser using DataLab