NCBI C++ ToolKit
Public Member Functions | Private Member Functions | List of all members
CSrvTaskTerminator Class Reference

Search Toolkit Book for CSrvTaskTerminator

This class is for TaskServer's internal use only. More...

#include "srv_tasks.hpp"
(Private to src/app/netcache.)

+ Inheritance diagram for CSrvTaskTerminator:
+ Collaboration diagram for CSrvTaskTerminator:

Public Member Functions

 CSrvTaskTerminator (void)
virtual ~CSrvTaskTerminator (void)
- Public Member Functions inherited from CSrvRCUUser
void CallRCU (void)
 Method to be called to schedule call of ExecuteRCU() at appropriate time. More...
 CSrvRCUUser (void)
virtual ~CSrvRCUUser (void)

Private Member Functions

virtual void ExecuteRCU (void)
 Method implementing RCU job that was scheduled earlier by CallRCU(). More...

Additional Inherited Members

- Public Attributes inherited from CSrvRCUUser
TSrvRCUListHook m_RCUListHook

Detailed Description

This class is for TaskServer's internal use only.

This class executes deletion of CSrvTask object. By design it is possible that when CSrvTask::Terminate() is called (or more exactly when ExecuteSlice() which probably executes at this time has finished) other threads still have pointer to this task (including probably inside TaskServer's code). But it's assumed (and upper code have to maintain this assumption) that once Terminate() is called any other thread will forget about this pointer soon and won't recall it from anywhere ever. With this assumption in mind CSrvTaskTerminator just need to wait for RCU grace period to pass and then it will be safe to delete CSrvTask object.

Definition at line 65 of file srv_tasks.hpp.

Constructor & Destructor Documentation

◆ CSrvTaskTerminator()

CSrvTaskTerminator::CSrvTaskTerminator ( void  )

Definition at line 657 of file scheduler.cpp.

◆ ~CSrvTaskTerminator()

CSrvTaskTerminator::~CSrvTaskTerminator ( void  )

Definition at line 660 of file scheduler.cpp.

Member Function Documentation

◆ ExecuteRCU()

void CSrvTaskTerminator::ExecuteRCU ( void  )

Method implementing RCU job that was scheduled earlier by CallRCU().

Implements CSrvRCUUser.

Definition at line 664 of file scheduler.cpp.

References CSrvTask::m_Terminator.

The documentation for this class was generated from the following files:
Modified on Wed May 22 11:34:52 2024 by rev. 669887