8#ifndef INCLUDED_BDLMT_THREADMULTIPLEXOR
9#define INCLUDED_BDLMT_THREADMULTIPLEXOR
256#include <bdlscm_version.h>
267#include <bsl_functional.h>
269#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
312 int processJobQueue();
348 template <
class t_JOBTYPE>
365template <
class t_JOBTYPE>
375 int previousNumProcessors = d_numProcessors;
376 if (previousNumProcessors < d_maxProcessors &&
377 previousNumProcessors ==
379 previousNumProcessors + 1)) {
385 int rc = d_jobQueue_p->tryPushBack(job);
391 return processJobQueue();
398 return d_maxProcessors;
404 return d_numProcessors;
Definition bdlcc_fixedqueue.h:274
Definition bdlmt_threadmultiplexor.h:289
~ThreadMultiplexor()
Destroy this thread multiplexor object.
int processJob(const t_JOBTYPE &job)
Definition bdlmt_threadmultiplexor.h:367
int maxProcessors() const
Return the maximum number of active processors.
Definition bdlmt_threadmultiplexor.h:396
ThreadMultiplexor(int maxProcessors, int maxQueueSize, bslma::Allocator *basicAllocator=0)
bsl::function< void()> Job
A callback of this type may be passed to the processJob method.
Definition bdlmt_threadmultiplexor.h:295
BSLMF_NESTED_TRAIT_DECLARATION(ThreadMultiplexor, bslma::UsesBslmaAllocator)
int numProcessors() const
Return the current number of active processors.
Definition bdlmt_threadmultiplexor.h:402
Forward declaration.
Definition bslstl_function.h:934
Definition bslma_allocator.h:457
Definition bsls_atomic.h:743
int testAndSwap(int compareValue, int swapValue)
Definition bsls_atomic.h:1702
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlmt_eventscheduler.h:522
Definition bslma_usesbslmaallocator.h:343