2 #ifndef BIG_REQUEST_MUXING_CLIENT_TASK_H
3 #define BIG_REQUEST_MUXING_CLIENT_TASK_H
4 #include /**/ "ace/pre.h"
7 #include "tao/Messaging/Messaging.h"
9 #include "ace/SString.h"
10 #include "ace/OS_NS_unistd.h"
11 #include "ace/Atomic_Op.h"
13 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 #endif /* ACE_LACKS_PRAGMA_ONCE */
17 /// Implement a Task to run the experiments using multiple threads.
18 class Client_Task
: public ACE_Task_Base
22 Client_Task (ACE_Thread_Manager
*thr_mgr
,
23 Test::Payload_Receiver_ptr receiver
,
24 CORBA::Long event_count
,
25 CORBA::ULong event_size
,
27 Messaging::SyncScope sync_scope
,
28 const ACE_CString
& ident
);
30 /// Thread entry point
34 const char *ID () const;
37 /// Make sure that all threads have connections available to
38 /// workaround bug 189
39 void validate_connection ();
42 /// Reference to the test interface
43 Test::Payload_Receiver_var payload_receiver_
;
45 /// Total number of events
46 CORBA::Long event_count_
;
48 /// Size of each message
49 CORBA::ULong event_size_
;
51 /// Keep a reference to the ORB, used to initialize the SyncScope
55 /// The SyncScope used in this Task
56 Messaging::SyncScope sync_scope_
;
58 /// Track the number of tasks still running.
59 ACE_Atomic_Op
<TAO_SYNCH_MUTEX
, unsigned long> tasks_running_
;
66 #include /**/ "ace/post.h"
67 #endif /* BIG_REQUEST_MUXING_CLIENT_TASK_H */