[thread.req.lockable.basic]

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

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

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

#### 32.2.5.2 *Cpp17BasicLockable* requirements [thread.req.lockable.basic]

[1](#1)

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

A type L meets the *Cpp17BasicLockable* requirements if the following expressions are
well-formed and have the specified semantics (m denotes a value of type L)[.](#1.sentence-1)

[ð](#itemdecl:1)

`m.lock()
`

[2](#2)

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

*Effects*: Blocks until a lock can be acquired for the current execution agent[.](#2.sentence-1)

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

[ð](#itemdecl:2)

`m.unlock()
`

[3](#3)

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

*Preconditions*: The current execution agent holds a non-shared lock on m[.](#3.sentence-1)

[4](#4)

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

*Effects*: Releases a non-shared lock on m held by the current execution agent[.](#4.sentence-1)

[5](#5)

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

*Throws*: Nothing[.](#5.sentence-1)
