1 #include "ace/Log_Category.h"
2 #include "ace/Reactor_Token_T.h"
4 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
6 ACE_ALLOC_HOOK_DEFINE_Tc(ACE_Reactor_Token_T
)
8 template <class ACE_TOKEN_TYPE
> void
9 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::dump () const
11 #if defined (ACE_HAS_DUMP)
12 ACE_TRACE ("ACE_Reactor_Token_T::dump");
14 ACELIB_DEBUG ((LM_DEBUG
, ACE_BEGIN_DUMP
, this));
15 ACELIB_DEBUG ((LM_DEBUG
, ACE_TEXT ("\n")));
16 ACELIB_DEBUG ((LM_DEBUG
, ACE_END_DUMP
));
17 #endif /* ACE_HAS_DUMP */
20 template <class ACE_TOKEN_TYPE
>
21 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::ACE_Reactor_Token_T
26 ACE_TRACE ("ACE_Reactor_Token_T::ACE_Reactor_Token");
28 this->queueing_strategy (s_queue
);
31 template <class ACE_TOKEN_TYPE
>
32 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::ACE_Reactor_Token_T (int s_queue
)
35 ACE_TRACE ("ACE_Reactor_Token_T::ACE_Reactor_Token");
37 this->queueing_strategy (s_queue
);
40 template <class ACE_TOKEN_TYPE
>
41 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::~ACE_Reactor_Token_T ()
43 ACE_TRACE ("ACE_Reactor_Token_T::~ACE_Reactor_Token_T");
46 template <class ACE_TOKEN_TYPE
> ACE_Reactor_Impl
&
47 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::reactor ()
49 return *this->reactor_
;
52 template <class ACE_TOKEN_TYPE
> void
53 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::reactor (ACE_Reactor_Impl
&reactor
)
55 this->reactor_
= &reactor
;
58 // Used to wakeup the reactor.
60 template <class ACE_TOKEN_TYPE
> void
61 ACE_Reactor_Token_T
<ACE_TOKEN_TYPE
>::sleep_hook ()
63 ACE_TRACE ("ACE_Reactor_Token_T::sleep_hook");
64 ACE_Time_Value
ping (ACE_Time_Value::zero
);
65 if (this->reactor_
->notify (0, ACE_Event_Handler::EXCEPT_MASK
, &ping
) == -1)
73 ACELIB_ERROR ((LM_ERROR
,
75 ACE_TEXT ("sleep_hook failed")));
80 ACE_END_VERSIONED_NAMESPACE_DECL