std::shared_lock<Mutex>::try_lock_for

Tries to lock the associated mutex in shared mode. Blocks until specified timeout_duration has elapsed or the lock is acquired, whichever comes first. On successful lock acquisition returns true, otherwise returns false. Effectively calls mutex()->try_lock_shared_for(timeout_duration).

# Declarations

template< class Rep, class Period >
bool try_lock_for( const std::chrono::duration<Rep,Period>& timeout_duration );

(since C++14)

# Parameters

# Return value

true if the ownership of the mutex has been acquired successfully, false otherwise.

# Example

This section is incompleteReason: no example

# See also