# Concurrency

> The leading template parameter of insert and search is the caller's synchronization contract.

8122c932

### Concurrent Calls

The leading template parameter of `insert` and `search` is the caller’s synchronization contract:

- `concurrent_k`, the default, admits any mix of readers and writers.
- `immutable_k` certifies no live mutators, so searches read neighbor lists without locks.
- `exclusive_k` certifies sole ownership, compiling every lock out for single-threaded builds.

A violated certification answers `contended_k` instead of returning a silently wrong result. `save`, `load`, `clear` and `health` never run concurrently with inserts, while `reserve` runs at any time.
