[#std-shared_lock-0b-try_lock_for] = xref:std.adoc[std]::xref:std/shared_lock-0b.adoc[shared_lock<folly::SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>>]::try_lock_for :relfileprefix: ../../ :mrdocs: Tries to acquire the managed mutex in shared mode within a duration. == Synopsis Declared in `<folly/SharedMutex.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Rep, typename Period> bool try_lock_for(std::chrono::duration<Rep, Period> const& timeout); ---- == Return Value `true` if the lock was acquired before the duration elapsed. == Parameters [cols="1,4"] |=== | Name| Description | *timeout* | Maximum time to wait for the lock. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#