MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / generate_thread_id

Function generate_thread_id

source/threads/thread.cpp:13–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace concurrencpp::details {
12 namespace {
13 std::uintptr_t generate_thread_id() noexcept {
14 static std::atomic_uintptr_t s_id_seed = 1;
15 return s_id_seed.fetch_add(1, std::memory_order_relaxed);
16 }
17
18 struct thread_per_thread_data {
19 const std::uintptr_t id = generate_thread_id();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected