8#ifndef INCLUDED_BSLMT_SLUICE
9#define INCLUDED_BSLMT_SLUICE
119#include <bslscm_version.h>
131#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
134#include <bsl_chrono.h>
161 struct GenerationDescriptor {
172 GenerationDescriptor *d_next;
186 GenerationDescriptor *d_signaledGeneration;
190 GenerationDescriptor *d_pendingGeneration;
194 GenerationDescriptor *d_descriptorPool;
231#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
286#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
298 template <
class CLOCK,
class DURATION>
300 const bsl::chrono::time_point<CLOCK, DURATION>& absTime);
323#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
325template <
class CLOCK,
class DURATION>
327 const bsl::chrono::time_point<CLOCK, DURATION>& absTime)
330 GenerationDescriptor *g =
331 static_cast<GenerationDescriptor *
>(
const_cast<void *
>(token));
334 int rc = g->d_sema.timedWait(absTime);
338 if (g->d_numSignaled) {
349 const int numThreads = --g->d_numThreads;
351 if (0 == numThreads) {
354 if (d_signaledGeneration == g) {
356 d_signaledGeneration = 0;
359 if (d_pendingGeneration == g) {
361 d_pendingGeneration = 0;
364 g->d_next = d_descriptorPool;
365 d_descriptorPool = g;
Definition bslma_allocator.h:457
Definition bslmt_lockguard.h:234
Definition bslmt_mutex.h:315
Definition bslmt_sluice.h:151
void wait(const void *token)
int timedWait(const void *token, const bsls::TimeInterval &absTime)
bsls::SystemClockType::Enum clockType() const
Return the clock type used for timeouts.
Definition bslmt_sluice.h:374
Sluice(const bsl::chrono::steady_clock &, bslma::Allocator *basicAllocator=0)
Sluice(bsls::SystemClockType::Enum clockType, bslma::Allocator *basicAllocator=0)
@ e_TIMED_OUT
Definition bslmt_sluice.h:213
~Sluice()
Destroy this sluice.
Sluice(bslma::Allocator *basicAllocator=0)
Sluice(const bsl::chrono::system_clock &, bslma::Allocator *basicAllocator=0)
Definition bslmt_timedsemaphore.h:221
@ e_TIMED_OUT
Definition bslmt_timedsemaphore.h:234
Definition bsls_timeinterval.h:301
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bslmt_barrier.h:344
Enum
Definition bsls_systemclocktype.h:117