BloombergLP::bslmt

Package namespace for multithreading components.

Types

NameDescription
Barrier This class defines a thread barrier.
ChronoUtil This struct provides a namespace for utility functions that operate on bsl::chrono facilities.
Condition This class implements a portable inter-thread signaling primitive.
ConditionImpl Platform-specific condition variable implementation.
Configuration This struct provides a namespace for a suite of functions that are used to manage the configuration of default values used in bslmt. Specifically, these functions manage the default value of thread stack size and provide access to the platform's native guard size, but may be extended to govern more traits in the future.
EntryPointFunctorAdapter Hold a copy of an instance of parameterized type, along with the allocator used to manage the copy. TYPE shall have a copy constructor, and declare the bslma::UsesBslmaAllocator trait if it uses bslma::Allocator as an argument to its copy constructor.
EntryPointFunctorAdapterUtil Utility functions for EntryPointFunctorAdapter.
EntryPointFunctorAdapter_Base This component-private type provides a non-templated view of EntryPointFunctorAdapter for accessing the invoker function. Do not use outside this component.
FastPostSemaphore This class implements a semaphore type, optimized for post, for thread synchronization.
FastPostSemaphoreImpl This class implements a semaphore type, optimized for post, for thread synchronization.
FastPostSemaphoreImplWorkaroundUtil This class provides utility functions for workarounds to system level issues for FastPostSemaphoreImpl.
Latch This class defines a thread synchronization mechanism that allows one or more threads to wait until a certain number of operations have been performed by other threads.
LockGuard This class template implements a guard for acquisition and release of synchronization resources (i.e., locks).
LockGuardTryLock This class template implements a guard for tentative acquisition and release of synchronization resources (i.e., locks).
LockGuardUnlock This class template implements a guard for release and reacquisition of synchronization resources (i.e., locks).
LockReadGuard DEPRECATED: Use ReadLockGuard instead.
LockWriteGuard DEPRECATED: Use WriteLockGuard instead.
MeteredMutex This class implements a mutex, that has the additional capability to keep track of hold time and wait time. The hold time is defined as the cumulative duration for which the mutex was in the locked state. The wait time is defined as the duration for which threads waited for the mutex.
Mutex This class implements a lightweight, portable wrapper of an OS-level mutex lock to support intra-process synchronization. The behavior is undefined if the lock method of this class is invoked more than once on the same mutex object in the same thread without an intervening call to unLock.
MutexImpl Primary template for platform-specific mutex implementations.
Once Gate-keeper class for code that should only execute once per process. This class is a POD-type and can be statically initialized to the value of the BSLMT_ONCE_INITIALIZE macro. For this reason, it does not have any explicitly-declared constructors or destructor.
OnceGuard Guard class for using Once safely. Construct an object of this class before conditionally entering one-time processing code. Destroy the object when the one-time code is complete. When used this way, this object will be in an "in-progress" state during the time that the one-time code is being executed.
Platform This struct provides a namespace for concurrency trait definitions.
QLock An efficient statically-initializable synchronization primitive that enables serialized access to shared resources. Objects of this class can only be manipulated through the use of a QLockGuard. The following idiom is used to initialize objects of type QLock: ` QLock mylock = BSLMT_QLOCK_INITIALIZER; `
QLockGuard This class provides the means to acquire and release the lock on a QLock object. Typically, the lock is acquired at construction and released automatically on destruction. This class also provides explicit lock, tryLock, and unlock primitives.
QLock_EventFlag [PRIVATE]This class provides a thread-safe mechanism for one thread to inform another thread that some event has occurred. A flag provides two primary manipulators, set, which indicates the event has occurred, and waitUntilSet, which waits until that event has occurred (or returns immediately if it has already occurred). A flag is intended to be used by only two threads: a thread setting the flag, and a thread waiting for the flag to be set, and the behavior is undefined if set is called while the flag is already set, or if waitUntilSet is called while another thread is waiting for the flag.
RWMutex This class is a platform-independent interface to a reader-writer lock ("RW mutex"). Multiple readers can safely hold the lock simultaneously, whereas only one writer is allowed to hold the lock at a time. This class uses the most efficient RW mutex implementation available for the current platform. Note that the implementation may allow readers to starve writers.
RWMutexImpl Platform-specific implementation of a readers-writer mutex.
ReadLockGuard This class template implements a guard for acquisition and release of read synchronization resources (i.e., reader locks).
ReadLockGuardTryLock This class template implements a guard for tentative acquisition and release of read synchronization resources (i.e., reader locks).
ReadLockGuardUnlock This class template implements a guard for release and reacquisition of read synchronization resources (i.e., reader locks).
ReaderWriterLock This class provides a multi-reader/single-writer lock mechanism.
ReaderWriterMutex This class provides a multi-reader/single-writer lock mechanism.
ReaderWriterMutexImpl This class provides a multi-reader/single-writer lock mechanism.
RecursiveMutex This class implements a recursive mutex (i.e., a mutex that can be locked any number of times by a thread, and then released by unlocking the mutex the same number of times). If there is an efficient native recursive mutex, this class wraps it. Otherwise, a reasonably efficient proprietary implementation is used. Note that Mutex should be preferred if at all possible.
RecursiveMutexImpl Platform-specific recursive mutex implementation (forward declaration).
RecursivemutexImpl Platform-specific recursive mutex implementation (forward declaration).
SaturatedTimeConversionImpUtil This struct provides a namespace for utility functions that convert time values between different time representations, and "saturate" when values are outside the range of values that may be represented in the destination type (meaning that values above the maximum representable value of the result type are set to the maximum value of the result type, and values below the minimum representable value of the result type are set to the minimum value for the result type).
Semaphore This class implements a portable semaphore type for thread synchronization. It forwards all requests to an appropriate platform-specific implementation.
SemaphoreImpl
Sluice This class controls the release of threads from a common synchronization point. One or more threads may "enter" a Sluice object, and then wait to be released. Either one waiting thread (via the signalOne method), or all waiting threads (via the signalAll method), may be signaled for release. In any case, Sluice provides a guarantee against starvation.
TestUtil This struct provides a namespace for a suite of utility functions that facilitate the creation of BDE-style test drivers.
TestUtil_Guard This class defines an object that provides exclusive access to the critical sections defined by this component's macros. Multiple Guard objects can exist at once, but only in the same thread -- if an attempt is made to construct a Guard while any Guards exist in other threads, the constructor will block until all Guard objects in other threads are destroyed. The behavior is undefined if a Guard object is anywhere but on the stack.
ThreadAttributes This simply constrained (value-semantic) attribute class characterizes a collection of thread attribute values. See the section for information on the class attributes.
ThreadGroup This class provides a simple mechanism for managing a group of joinable threads. The destructor ensures that any running threads are detached so that resources are not leaked. This class is thread-enabled, thread-safe, and exception-neutral.
ThreadUtil This struct provides a suite of portable utility functions for managing threads.
ThreadUtilImpl Platform-specific implementation of ThreadUtil.
ThroughputBenchmark This class is a mechanism that provides performance testing for multi- threaded components. It allows running different thread functions at the same time, and simulates a work load between subsequent calls to the tested thread functions. The results are loaded into a bslmt::ThroughputBenchmarkResult object, which provides access to counts of the work done by each thread, thread group, and sample, divided by the number of actual seconds of execution.
ThroughputBenchmarkResult This class provides support for output of multi-threaded performance benchmark results. The results are counts of work done during the benchmark time period divided by the time period.
ThroughputBenchmarkResult_TestUtil This component-private class provides modifiable access to the non-public attributes of a ThroughPutBenchmarkResult object supplied on construction, and is provided for use exclusively in the test driver of this component.
ThroughputBenchmark_TestUtil This class implements a test utility that gives the test driver access to the unexposed data members of ThroughputBenchmark.
ThroughputBenchmark_WorkData Data transferred to ThroughputBenchmark_WorkFunction.
ThroughputBenchmark_WorkFunction This class is the work function functor, being called for each work thread.
TimedCompletionGuard This class implements a guard for work completion within a specified duration.
TimedSemaphore This class implements a portable timed semaphore type for thread synchronization. It forwards all requests to an appropriate platform-specific implementation.
TimedSemaphoreImpl Forward declaration of platform-specific timed semaphore implementation.
TryLockGuard DEPRECATED: Use LockGuardTryLock instead.
Turnstile This class provides a mechanism to meter time. Using either the constructor or the reset method, the client specifies rate, indicating the number of events per second that the turnstile will allow. The client then calls waitTurn, which will either sleep until the next event is to occur, or return immediately if waitTurn was called after the next event is due. If waitTurn is not called until after the next event is due, the turnstile is said to be lagging behind, and calls to waitTurn will not sleep until the events have caught up with the schedule. Note that calling waitTurn a single time does not bring a turnstile back on schedule. For example, if a turnstile's configured frequency is one event per second, and the client is 10 seconds behind schedule, if waitTurn were subsequently called once per second, the turnstile will remain at 10 seconds behind schedule. The amount by which events are lagging behind the schedule can be determined via the lagTime method, which returns the positive number of microseconds by which the turnstile is lagging, or 0 if the turnstile is not behind schedule.
UnLockGuard This class is DEPRECATED. Use LockGuardUnlock instead.
WriteLockGuard This class template implements a guard for acquisition and release of write synchronization resources (i.e., writer locks).
WriteLockGuardTryLock This class template implements a guard for tentative acquisition and release of write synchronization resources (i.e., writer locks).
WriteLockGuardUnlock This class template implements a guard for release and reacquisition of write synchronization resources (i.e., writer locks).

Functions

NameDescription
operator<< Write the value of the specified object object to the specified output stream in a single-line format, and return a reference to stream. If stream is not valid on entry, this operation has no effect. Note that this human-readable format is not fully specified, can change without notice, and is logically equivalent to: ` print(stream, 0, -1); `
operator== Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two ThreadAttributes objects have the same value if the corresponding values of their detachedState, guardSize, inheritSchedule, schedulingPolicy, schedulingPriority, and stackSize attributes are the same.
operator!= Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two baltzo::LocalTimeDescriptor objects do not have the same value if the corresponding values of their detachedState, guardSize, inheritSchedule, schedulingPolicy, schedulingPriority, and stackSize attributes are not the same.