Using Timed Waits
In some environments,
RWMutexLock supports timed acquisition of a mutex. This capability is included in a version of the
acquire() function that accepts a time limit for waiting, specified as an
unsigned long number of milliseconds.
In those environments that do not support a timed wait on a mutex, the timed version of acquire() attempts a conditional acquisition of the mutex, and if the mutex is not immediately available, the function returns a value indicating timeout. The macro RW_THR_HAS_TIMED_MUTEX_ACQUIRE can be used to determine whether or not the current environment supports true timeouts for mutex acquisition; this macro is defined when timed waits are supported.