The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CNullThreadPoolMonitor Class Reference
[Null ObjectsMonitoring]

Inheritance diagram for CNullThreadPoolMonitor:
Collaboration diagram for CNullThreadPoolMonitor:

List of all members.


Detailed Description

An object that implements IMonitorThreadPool and does nothing.

Public Member Functions

void OnThreadPoolThreadCreated () override
 Called when a thread is created. Note that this is NOT called from the thread itself.
void OnThreadPoolThreadStarted () override
 Called when a thread is started. Note that this IS called from the thread itself.
void OnThreadPoolDispatch () override
 Called when a work item is dispatched to the thread pool. Note that this is NOT called when I/O completions are dispatched to the pool as there's no way to know when this happens. However this IS called when you manually dispatch work items to the pool and so the difference between an events/sec counter incremented by this function and a similar counter that is incremented when processing starts will show the I/O completions.
void OnThreadPoolWorkItemsDequeued (const DWORD) override
 Called when work items are dequeued by a thread. This includes items that are manually dispatched and I/O completions. Some pools may be able to dequeue multiple work items at once, whilst others can only dequeue a single work item at a time.
void OnThreadPoolProcessingStarted (const bool) override
 Called when a thread in the pool starts working on a work item that has been dispatched to the pool. Some pools can be configured to issue a callback on this method when the queue reports as empty. If they do this then dataAvailable will be false.
void OnThreadPoolProcessingStopped (const bool) override
 Called when a thread in the pool finishes working on a work item that has been dispatched to the pool. If the pool can report queue empty then this will be called with dataAvailable as false.
void OnThreadPoolThreadStopped () override
 Called when a thread is destroyed. Note that this IS called from the thread itself.
void OnThreadPoolThreadDestroyed () override
 Called when a thread is destroyed. Note that this is NOT called from the thread itself.
void OnThreadPoolError (const _tstring &) override
 Called if there's an unexpected error on a thread in the pool, generally this means that there was an exception thrown whilst dealing with a work item. The thread will continue and pretty much all you can do is log or ignore the message...

Member Function Documentation

void OnThreadPoolThreadCreated (  )  [inline, override, virtual]

Called when a thread is created. Note that this is NOT called from the thread itself.

Implements IMonitorThreadPool.

void OnThreadPoolThreadStarted (  )  [inline, override, virtual]

Called when a thread is started. Note that this IS called from the thread itself.

Implements IMonitorThreadPool.

void OnThreadPoolDispatch (  )  [inline, override, virtual]

Called when a work item is dispatched to the thread pool. Note that this is NOT called when I/O completions are dispatched to the pool as there's no way to know when this happens. However this IS called when you manually dispatch work items to the pool and so the difference between an events/sec counter incremented by this function and a similar counter that is incremented when processing starts will show the I/O completions.

Implements IMonitorThreadPool.

void OnThreadPoolWorkItemsDequeued ( const   numWorkItems  )  [inline, override, virtual]

Called when work items are dequeued by a thread. This includes items that are manually dispatched and I/O completions. Some pools may be able to dequeue multiple work items at once, whilst others can only dequeue a single work item at a time.

Implements IMonitorThreadPool.

void OnThreadPoolProcessingStarted ( const   dataAvailable  )  [inline, override, virtual]

Called when a thread in the pool starts working on a work item that has been dispatched to the pool. Some pools can be configured to issue a callback on this method when the queue reports as empty. If they do this then dataAvailable will be false.

Implements IMonitorThreadPool.

void OnThreadPoolProcessingStopped ( const   dataAvailable  )  [inline, override, virtual]

Called when a thread in the pool finishes working on a work item that has been dispatched to the pool. If the pool can report queue empty then this will be called with dataAvailable as false.

Implements IMonitorThreadPool.

void OnThreadPoolThreadStopped (  )  [inline, override, virtual]

Called when a thread is destroyed. Note that this IS called from the thread itself.

Implements IMonitorThreadPool.

void OnThreadPoolThreadDestroyed (  )  [inline, override, virtual]

Called when a thread is destroyed. Note that this is NOT called from the thread itself.

Implements IMonitorThreadPool.

void OnThreadPoolError ( const _tstring message  )  [inline, override, virtual]

Called if there's an unexpected error on a thread in the pool, generally this means that there was an exception thrown whilst dealing with a work item. The thread will continue and pretty much all you can do is log or ignore the message...

Implements IMonitorThreadPool.


Generated on Sun Sep 12 19:08:46 2021 for The Server Framework - v7.4 by doxygen 1.5.3