Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

TP_Reactor.h File Reference

#include "ace/pre.h"
#include "ace/Select_Reactor.h"
#include "ace/Log_Msg.h"
#include "ace/post.h"

Include dependency graph for TP_Reactor.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


class  ACE_EH_Dispatch_Info
 This structure contains information of the activated event handler. More...

class  ACE_TP_Reactor
 Specialization of Select Reactor to support thread-pool based event dispatching. More...

class  ACE_TP_Token_Guard
 A helper class that helps grabbing, releasing and waiting on tokens for a thread that tries calling handle_events (). More...

Detailed Description

TP_Reactor.h,v 2003/02/21 18:36:32 chad Exp

The <ACE_TP_Reactor> (aka, Thread Pool Reactor) uses the Leader/Followers pattern to demultiplex events among a pool of threads. When using a thread pool reactor, an application pre-spawns a _fixed_ number of threads. When these threads invoke the <ACE_TP_Reactor>'s <handle_events> method, one thread will become the leader and wait for an event. The other follower threads will queue up waiting for their turn to become the leader. When an event occurs, the leader will pick a follower to become the leader and go on to handle the event. The consequence of using <ACE_TP_Reactor> is the amortization of the costs used to creating threads. The context switching cost will also reduce. More over, the total resources used by threads are bounded because there are a fixed number of threads.

Irfan Pyarali <> , Nanbor Wang <>

Definition in file TP_Reactor.h.

Generated on Mon Jun 16 12:39:48 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002