diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-19 00:37:14 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-19 00:37:14 +0000 |
commit | de455ace388cc05a279d512a24398324ed1e0c28 (patch) | |
tree | 345d74d18354433b2d66c1f908f56edd42dd8628 /TAO/orbsvcs/orbsvcs/Event/ReactorTask.h | |
parent | 3e65d14268d4b7a05cbf355488483b307a6f45f1 (diff) | |
download | ATCD-de455ace388cc05a279d512a24398324ed1e0c28.tar.gz |
ChangeLogTag:Wed Feb 18 17:56:54 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/ReactorTask.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/ReactorTask.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h new file mode 100644 index 00000000000..973d6f82f97 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h @@ -0,0 +1,76 @@ +// $Id$ + +#if !defined ACE_ReactorTask_H +#define ACE_ReactorTask_H + +// BBM, moved this here from UPSingleProcessorOrb.h +//## begin module.includes preserve=yes +#include "Fast_Reactor.h" +#if defined (ACE_OLD_STYLE_REACTOR) +# define ACE_ORB_REACTOR ACE_ES_Fast_Reactor +#endif /* ACE_OLD_STYLE_REACTOR */ +//## end module.includes + +// Added these. +#include "ace/Timer_Heap.h" +#include "ace/Timer_List.h" + +#include "Local_ESTypes.h" +#include "RT_Task.h" + +class ACE_ES_Reactor_Task : public ACE_RT_Task +// = TITLE +// Event Service Timer Task +// +// = DESCRIPTION +// An active object that dispatches timers from its own ReactorEx. +{ +public: + // BBM, added this. +#if defined (ACE_OLD_STYLE_REACTOR) + typedef ACE_ORB_REACTOR Reactor; +#else + typedef ACE_Reactor Reactor; +#endif /* ACE_OLD_STYLE_REACTOR */ + + ACE_ES_Reactor_Task(); + // Default construction. + + ~ACE_ES_Reactor_Task(); + // Destruction. + + virtual int svc_hook(RtecScheduler::OS_Priority); + // Assume ownership of the reactor_. + + int open_reactor (RtecScheduler::Period &period); + // This is a hack for now. + + virtual int svc_one(); + // Calls reactor_.handle_events until done_ is set. + + void shutdown_task(); + // Sets done_ and notifies the reactor_. + + Reactor &get_reactor(); + // ReactorEx accessor. + + virtual void threads_closed(); + // Deletes this. + +private: + ACE_Timer_List timer_queue_; + // The timer storage mechanism used by reactor_. + +#if !defined (ACE_OLD_STYLE_REACTOR) + ACE_ES_Fast_Reactor fast_reactor_; + // The timer dispatch mechanism. +#endif /* ! ACE_OLD_STYLE_REACTOR */ + + Reactor reactor_; + // "Public" handle to fast_reactor_. + + sig_atomic_t done_; + // When set, end the event loop. +}; + +#endif /* ACE_ReactorTask_H */ |