[thread.req.lockable.shared.timed]

# 32 Concurrency support library [[thread]](./#thread)

## 32.2 Requirements [[thread.req]](thread.req#lockable.shared.timed)

### 32.2.5 Requirements for *Cpp17Lockable* types [[thread.req.lockable]](thread.req.lockable#shared.timed)

#### 32.2.5.6 *Cpp17SharedTimedLockable* requirements [thread.req.lockable.shared.timed]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L398)

A type L meets the *Cpp17SharedTimedLockable* requirements if
it meets the [*Cpp17SharedLockable*](thread.req.lockable.shared#:Cpp17SharedLockable "32.2.5.5 Cpp17SharedLockable requirements [thread.req.lockable.shared]") requirements, and
the following expressions are well-formed, have type bool, and
have the specified semantics
(m denotes a value of type L,rel_time denotes a value of a specialization of chrono​::​duration, andabs_time denotes a value of a specialization of chrono​::​time_point)[.](#1.sentence-1)

[ð](#itemdecl:1)

`m.try_lock_shared_for(rel_time)
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L412)

*Effects*: Attempts to acquire a lock for the current execution agent within
the relative timeout ([[thread.req.timing]](thread.req.timing "32.2.4 Timing specifications")) specified by rel_time[.](#2.sentence-1)

The function will not return within the timeout specified by rel_time unless it has obtained a lock on m for the current execution agent[.](#2.sentence-2)

If an exception is thrown then a lock has not been acquired for
the current execution agent[.](#2.sentence-3)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L421)

*Returns*: true if the lock was acquired, false otherwise[.](#3.sentence-1)

[ð](#itemdecl:2)

`m.try_lock_shared_until(abs_time)
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L431)

*Effects*: Attempts to acquire a lock for the current execution agent before
the absolute timeout ([[thread.req.timing]](thread.req.timing "32.2.4 Timing specifications")) specified by abs_time[.](#4.sentence-1)

The function will not return before the timeout specified by abs_time unless it has obtained a lock on m for the current execution agent[.](#4.sentence-2)

If an exception is thrown then a lock has not been acquired for
the current execution agent[.](#4.sentence-3)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L440)

*Returns*: true if the lock was acquired, false otherwise[.](#5.sentence-1)
