8#ifndef INCLUDED_BDLMT_THREADMULTIPLEXOR
9#define INCLUDED_BDLMT_THREADMULTIPLEXOR
263#include <bdlscm_version.h>
274#include <bsl_functional.h>
276#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
319 int processJobQueue();
358 template <
class t_JOBTYPE>
375template <
class t_JOBTYPE>
385 int previousNumProcessors = d_numProcessors;
386 if (previousNumProcessors < d_maxProcessors &&
387 previousNumProcessors ==
389 previousNumProcessors + 1)) {
395 int rc = d_jobQueue_p->tryPushBack(job);
401 return processJobQueue();
408 return d_maxProcessors;
414 return d_numProcessors;
Definition bdlcc_fixedqueue.h:274
Definition bdlmt_threadmultiplexor.h:296
~ThreadMultiplexor()
Destroy this thread multiplexor object.
int processJob(const t_JOBTYPE &job)
Definition bdlmt_threadmultiplexor.h:377
int maxProcessors() const
Return the maximum number of active processors.
Definition bdlmt_threadmultiplexor.h:406
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:302
BSLMF_NESTED_TRAIT_DECLARATION(ThreadMultiplexor, bslma::UsesBslmaAllocator)
int numProcessors() const
Return the current number of active processors.
Definition bdlmt_threadmultiplexor.h:412
Forward declaration.
Definition bslstl_function.h:946
Definition bslma_allocator.h:545
Definition bsls_atomic.h:744
int testAndSwap(int compareValue, int swapValue)
Definition bsls_atomic.h:1723
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlmt_eventscheduler.h:550
Definition bslma_usesbslmaallocator.h:344