class PerThreadSem
Defined at line 41 of file ../../third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h
Public Methods
void PerThreadSem ()
Defined at line 43 of file ../../third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h
void PerThreadSem (const PerThreadSem & )
Defined at line 44 of file ../../third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h
void Tick (base_internal::ThreadIdentity * identity)
Routine invoked periodically (once a second) by a background thread.
Has no effect on user-visible state.
void SetThreadBlockedCounter (std::atomic<int> * counter)
---------------------------------------------------------------------------
Routines used by autosizing threadpools to detect when threads are
blocked. Each thread has a counter pointer, initially zero. If non-zero,
the implementation atomically increments the counter when it blocks on a
semaphore, a decrements it again when it wakes. This allows a threadpool
to keep track of how many of its threads are blocked.
SetThreadBlockedCounter() should be used only by threadpool
implementations. GetThreadBlockedCounter() should be used by modules that
block threads; if the pointer returned is non-zero, the location should be
incremented before the thread blocks, and decremented after it wakes.
std::atomic<int> * GetThreadBlockedCounter ()
PerThreadSem & operator= (const PerThreadSem & )
Defined at line 45 of file ../../third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h
Friends
void PerThreadSem (absl::base_internal::ThreadIdentity * )
class Mutex
class PerThreadSemTest