NCBI C++ ToolKit
Classes | Enumerations | Functions
threads_man.hpp File Reference
#include "scheduler.hpp"
+ Include dependency graph for threads_man.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SSrvThread
 

Enumerations

enum  EThreadState {
  eThreadStarting , eThreadRunning , eThreadRevived , eThreadLockedForStop ,
  eThreadStopped , eThreadReleased , eThreadDormant
}
 
enum  EThreadMgrState {
  eThrMgrIdle , eThrMgrPreparesToStop , eThrMgrThreadExited , eThrMgrSocksMoved ,
  eThrMgrNeedNewThread , eThrMgrStarting
}
 

Functions

void InitCurThreadStorage (void)
 
SSrvThreadGetCurThread (void)
 
void ConfigureThreads (const CNcbiRegistry *reg, CTempString section)
 
bool ReConfig_Threads (const CTempString &section, const CNcbiRegistry &new_reg, string &err_message)
 
void WriteSetup_Threads (CSrvSocketTask &task)
 
bool InitThreadsMan (void)
 
void RunMainThread (void)
 
void FinalizeThreadsMan (void)
 
void RequestThreadStart (SSrvThread *thr)
 
void RequestThreadStop (SSrvThread *thr)
 
void RequestThreadRevive (SSrvThread *thr)
 
TSrvThreadNum GetCntRunningThreads (void)
 
bool IsThreadRunning (SSrvThread *thr)
 

Enumeration Type Documentation

◆ EThreadMgrState

Enumerator
eThrMgrIdle 
eThrMgrPreparesToStop 
eThrMgrThreadExited 
eThrMgrSocksMoved 
eThrMgrNeedNewThread 
eThrMgrStarting 

Definition at line 104 of file threads_man.hpp.

◆ EThreadState

Enumerator
eThreadStarting 
eThreadRunning 
eThreadRevived 
eThreadLockedForStop 
eThreadStopped 
eThreadReleased 
eThreadDormant 

Definition at line 67 of file threads_man.hpp.

Function Documentation

◆ ConfigureThreads()

void ConfigureThreads ( const CNcbiRegistry reg,
CTempString  section 
)

Definition at line 443 of file threads_man.cpp.

References IRegistry::GetInt(), kMaxNumberOfThreads, and s_MaxRunningThreads.

Referenced by s_ReadConfiguration().

◆ FinalizeThreadsMan()

void FinalizeThreadsMan ( void  )

Definition at line 497 of file threads_man.cpp.

Referenced by CTaskServer::Finalize().

◆ GetCntRunningThreads()

TSrvThreadNum GetCntRunningThreads ( void  )

Definition at line 102 of file threads_man.cpp.

References i, IsThreadRunning(), result, s_MaxRunningThreads, and s_Threads.

Referenced by s_DoFatalAbort(), and s_SaveState().

◆ GetCurThread()

SSrvThread* GetCurThread ( void  )

◆ InitCurThreadStorage()

void InitCurThreadStorage ( void  )

Definition at line 431 of file threads_man.cpp.

References NULL, and SRV_FATAL.

Referenced by s_LowLevelInit().

◆ InitThreadsMan()

bool InitThreadsMan ( void  )

◆ IsThreadRunning()

bool IsThreadRunning ( SSrvThread thr)
inline

◆ ReConfig_Threads()

bool ReConfig_Threads ( const CTempString section,
const CNcbiRegistry new_reg,
string err_message 
)

Definition at line 450 of file threads_man.cpp.

Referenced by CTaskServer::ReConfig().

◆ RequestThreadRevive()

void RequestThreadRevive ( SSrvThread thr)

◆ RequestThreadStart()

void RequestThreadStart ( SSrvThread thr)

◆ RequestThreadStop()

void RequestThreadStop ( SSrvThread thr)

◆ RunMainThread()

void RunMainThread ( void  )

◆ WriteSetup_Threads()

void WriteSetup_Threads ( CSrvSocketTask task)
Modified on Fri Sep 20 14:58:15 2024 by modify_doxy.py rev. 669887