[thread.req.lockable.req]

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

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

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

#### 32.2.5.3 *Cpp17Lockable* requirements [thread.req.lockable.req]

[1](#1)

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

A type L meets the *Cpp17Lockable* requirements if it meets the [*Cpp17BasicLockable*](thread.req.lockable.basic#:Cpp17BasicLockable "32.2.5.2 Cpp17BasicLockable requirements [thread.req.lockable.basic]") requirements and the following expressions are well-formed and have the specified semantics
(m denotes a value of type L)[.](#1.sentence-1)

[ð](#itemdecl:1)

`m.try_lock()
`

[2](#2)

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

*Effects*: Attempts to acquire a lock for the current execution agent without blocking[.](#2.sentence-1)

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

[3](#3)

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

*Return type*: bool[.](#3.sentence-1)

[4](#4)

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

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