[exec.scope.simple.counting.general]

# 33 Execution control library [[exec]](./#exec)

## 33.14 Execution scope utilities [[exec.scope]](exec.scope#simple.counting.general)

### 33.14.2 Counting Scopes [[exec.counting.scopes]](exec.counting.scopes#exec.scope.simple.counting.general)

#### 33.14.2.2 Simple Counting Scope [[exec.scope.simple.counting]](exec.scope.simple.counting#general)

#### 33.14.2.2.1 General [exec.scope.simple.counting.general]

[ð](#lib:execution::simple_counting_scope)

namespace std::execution {class simple_counting_scope {public:// [[exec.simple.counting.token]](exec.simple.counting.token "33.14.2.2.4 Token"), tokenstruct token; static constexpr size_t max_associations = *implementation-defined*; // [[exec.simple.counting.ctor]](exec.simple.counting.ctor "33.14.2.2.2 Constructor and Destructor"), constructor and destructor simple_counting_scope() noexcept;
 simple_counting_scope(simple_counting_scope&&) = delete; ~simple_counting_scope(); // [[exec.simple.counting.mem]](exec.simple.counting.mem "33.14.2.2.3 Members"), members token get_token() noexcept; void close() noexcept; [sender](exec.snd.concepts#concept:sender "33.9.3 Sender concepts [exec.snd.concepts]") auto join() noexcept; private: size_t *count*; // *exposition only**scope-state-type* *state*; // *exposition only*bool *try-associate*() noexcept; // *exposition only*void *disassociate*() noexcept; // *exposition only*template<class State>bool *start-join-sender*(State& state) noexcept; // *exposition only*};}

[1](#1)

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

For purposes of determining the existence of a data race,get_token,close,join,*try-associate*,*disassociate*, and*start-join-sender* behave as atomic operations ([[intro.multithread]](intro.multithread "6.10.2 Multi-threaded executions and data races"))[.](#1.sentence-1)

These operations on a single object of
type simple_counting_scope appear to occur in a single total order[.](#1.sentence-2)
