3 //=============================================================================
5 * @file Wait_On_LF_No_Upcall.h
7 * @author Chris Cleeland <cleeland@ociweb.com>
9 //=============================================================================
12 #ifndef TAO_WAIT_ON_LF_NO_UPCALL_H
13 #define TAO_WAIT_ON_LF_NO_UPCALL_H
15 #include /**/ "ace/pre.h"
17 #include "tao/Wait_On_Leader_Follower.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
28 * @class TAO_Wait_On_LF_No_Upcall
30 * @brief Wait according to the Leader-Follower model (like
31 * TAO_Wait_On_Leader_Follower), but do not allow nested upcalls.
33 * This implementation sets a thread-specific flag on entering wait()
34 * that indicates that the thread is unavailable to service upcalls.
35 * Connection handler that are acting in a server role cooperate by
36 * checking this flag in their handle_input, and returning if they're
37 * in a thread that is currently suspending upcalls. The flag gets
38 * reset once the reply is received.
40 class Wait_On_LF_No_Upcall
: public TAO_Wait_On_Leader_Follower
44 explicit Wait_On_LF_No_Upcall (TAO_Transport
*t
);
47 ~Wait_On_LF_No_Upcall () override
= default;
49 /*! @copydoc TAO_Wait_Strategy::wait() */
50 int wait (ACE_Time_Value
*max_wait_time
, TAO_Synch_Reply_Dispatcher
&rd
) override
;
52 /*! @copydoc TAO_Wait_Strategy::can_process_upcalls() */
53 bool can_process_upcalls () const override
;
55 /*! @copydoc TAO_Wait_Strategy::defer_upcall() */
56 int defer_upcall (ACE_Event_Handler
*) override
;
60 TAO_END_VERSIONED_NAMESPACE_DECL
62 #include /**/ "ace/post.h"
64 #endif /* TAO_WAIT_ON_LF_NO_UPCALL_H */