THREADPOOL_CATCH_UNHANDLED_EXCEPTIONS);
54 boolqueuing_was_forbidden;
109 "No more threads allowed in pool.");
void Process(void)
Do the actual job Called by whichever thread handles this request.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
void Set(TValue new_value) THROWS_NONE
Set atomic counter value.
TValue Get(void) const THROWS_NONE
Get atomic counter value.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual ~CStdPoolOfThreads()
CMutex m_Mutex
The guard for m_MaxThreads, m_MaxUrgentThreads, and m_Delta.
virtual void KillAllThreads(TKillFlags flags)
Causes all threads in the pool to exit cleanly after finishing all pending requests,...
void WaitForRoom(unsigned int timeout_sec=kMax_UInt, unsigned int timeout_nsec=0)
Wait for the room in the queue up to timeout_sec + timeout_nsec/1E9 seconds.
TItemHandle AcceptRequest(const CRef< CStdRequest > &request, TUserPriority priority=0, unsigned int timeout_sec=0, unsigned int timeout_nsec=0)
Put a request in the queue with a given priority.
CAtomicCounter::TValue TACValue
list< CRef< TThread > > TThreads
virtual void UnRegister(TThread &thread)
Unregister a thread.
int TKillFlags
binary OR of EKillFlags
CAtomicCounter_WithAutoInit m_ThreadCount
The current number of threads in the pool.
CAtomicCounter_WithAutoInit m_MaxThreads
The maximum number of threads the pool can hold.
virtual void Register(TThread &thread)
Register a thread.
@ fKill_Wait
Wait for all threads in the pool to finish.
@ fKill_Reopen
Allow a fresh batch of worker threads.
static void Exit(void *exit_data)
Cancel current thread.
Pool of generic task-executing threads.
NCBI_PARAM_DEF_EX(bool, ThreadPool, Catch_Unhandled_Exceptions, true, 0, THREADPOOL_CATCH_UNHANDLED_EXCEPTIONS)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4