NCBI C++ ToolKit
Classes | Public Member Functions | Protected Attributes | List of all members
CTimedProcessWatcher Class Reference

Search Toolkit Book for CTimedProcessWatcher

+ Inheritance diagram for CTimedProcessWatcher:
+ Collaboration diagram for CTimedProcessWatcher:

Classes

struct  SParams
 

Public Member Functions

 CTimedProcessWatcher (SParams &p)
 
virtual EAction Watch (TProcessHandle pid)
 This method is getting called periodically during the process execution by the ExecWait() method. More...
 
- Public Member Functions inherited from CPipe::IProcessWatcher
virtual ~IProcessWatcher ()
 
virtual EAction OnStart (TProcessHandle)
 This method is called when the process has just been started by the ExecWait() method. More...
 

Protected Attributes

CRemoteAppReaper::CScheduler & m_ProcessManager
 
const string m_ProcessType
 
const CTimer m_Deadline
 

Additional Inherited Members

- Public Types inherited from CPipe::IProcessWatcher
enum  EAction { eContinue , eStop , eExit }
 An action which the ExecWait() method should take after the Watch() method has returned. More...
 

Detailed Description

Definition at line 204 of file exec_helpers.cpp.

Constructor & Destructor Documentation

◆ CTimedProcessWatcher()

CTimedProcessWatcher::CTimedProcessWatcher ( SParams p)
inline

Definition at line 220 of file exec_helpers.cpp.

Member Function Documentation

◆ Watch()

virtual EAction CTimedProcessWatcher::Watch ( TProcessHandle  )
inlinevirtual

This method is getting called periodically during the process execution by the ExecWait() method.

Parameters
pidProcess Id to monitor
Returns
eContinue to keep the process running; eStop to kill the process; or eExit to bail from ExecWait() with eCanceled (the process is not killed, but all I/O is severed with it)

Implements CPipe::IProcessWatcher.

Reimplemented in CMonitoredProcessWatcher, and CJobContextProcessWatcher.

Definition at line 227 of file exec_helpers.cpp.

References CPipe::IProcessWatcher::eContinue, CPipe::IProcessWatcher::eExit, ERR_POST, CPipe::IProcessWatcher::eStop, CTimer::IsExpired(), m_Deadline, m_ProcessManager, m_ProcessType, and CTimer::PresetSeconds().

Referenced by CJobContextProcessWatcher::Watch().

Member Data Documentation

◆ m_Deadline

const CTimer CTimedProcessWatcher::m_Deadline
protected

Definition at line 242 of file exec_helpers.cpp.

Referenced by Watch(), and CJobContextProcessWatcher::Watch().

◆ m_ProcessManager

CRemoteAppReaper::CScheduler& CTimedProcessWatcher::m_ProcessManager
protected

Definition at line 240 of file exec_helpers.cpp.

Referenced by CMonitoredProcessWatcher::MonitorRun(), and Watch().

◆ m_ProcessType

const string CTimedProcessWatcher::m_ProcessType
protected

Definition at line 241 of file exec_helpers.cpp.

Referenced by Watch().


The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:57:41 2024 by modify_doxy.py rev. 669887