# std::experimental::latch::~latch

> C++ Atlas: `cppatlas.com/w/cpp/experimental/latch/~latch` | Source: https://en.cppreference.com/w/cpp/experimental/latch/~latch | Domain: Technical specifications

The behavior is undefined if a thread is blocked at the synchronization point.

## Official Specification Summary (cppreference)

```cpp
~latch(); // (concurrency TS)
```

Destroys the latch.

The behavior is undefined if a thread is blocked at the synchronization point.

The destructor may be called even if not all threads have returned from `wait()` or `count_down_and_wait()`, provided the internal counter must equal zero.

The destructor may block until all threads have returned from the blocking functions.

No thread is allowed to block on this latch after one thread has invoked the destructor.

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/latch/~latch (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.