blob: 11b19cb7df1a9dc5e1adecd9bbd3232c46b3d165 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = LIBRARY
// tests
//
// = FILENAME
// Reactor_Test.h
//
// = DESCRIPTION
// This file contains class definitions needed for template
// instantiation in the Reactor_Test.cpp file.
// Based on $ACE_ROOT/tests/MT_Reactor_Timer_Test.h
//
// = AUTHOR
// Wei Chiang
//
// ============================================================================
#if !defined (__CLASSIX_REACTOR_TEST_H)
#define __CLASSIX_REACTOR_TEST_H
#include "ace/Reactor.h"
#include "ace/Task.h"
class Time_Handler : public ACE_Task<ACE_SYNCH>
{
public:
Time_Handler (void);
void setup (void);
virtual int svc (void);
// Run by a daemon thread to handle deferred processing.
virtual int handle_timeout (const ACE_Time_Value &tv,
const void *arg);
private:
enum
{
TIMER_SLOTS = 10
};
long timer_id_[TIMER_SLOTS];
int step_;
ACE_Reactor my_reactor_;
};
#endif /* __CLASSIX_REACTOR_TEST_H */
|