File: ACE_Thread_Strategy.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (134 lines) | stat: -rw-r--r-- 4,453 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
.TH ACE_Thread_Strategy 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Thread_Strategy \- Defines the interface for specifying a concurrency strategy for a <SVC_HANDLER> based on multithreading. 
.SH SYNOPSIS
.br
.PP
\fC#include <Strategies_T.h>\fR
.PP
Inherits \fBACE_Concurrency_Strategy< SVC_HANDLER >\fR.
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_Thread_Strategy\fR (int flags = 0)"
.br
.RI "\fI"Do-nothing constructor".\fR"
.ti -1c
.RI "\fBACE_Thread_Strategy\fR (\fBACE_Thread_Manager\fR *tm, long thr_flags, size_t n_threads = 1, int flags = 0)"
.br
.RI "\fIInitialize the strategy.\fR"
.ti -1c
.RI "virtual int \fBopen\fR (\fBACE_Thread_Manager\fR *tm, long thr_flags, size_t n_threads = 1, int flags = 0)"
.br
.RI "\fIInitialize the strategy.\fR"
.ti -1c
.RI "virtual \fB~ACE_Thread_Strategy\fR (void)"
.br
.ti -1c
.RI "virtual int \fBactivate_svc_handler\fR (SVC_HANDLER *svc_handler, void *arg = 0)"
.br
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Protected Types

.in +1c
.ti -1c
.RI "typedef \fBACE_Concurrency_Strategy\fR<SVC_HANDLER> \fBinherited\fR"
.br
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "\fBACE_Thread_Manager\fR* \fBthr_mgr_\fR"
.br
.RI "\fIThread manager for this class (must be provided).\fR"
.ti -1c
.RI "long \fBthr_flags_\fR"
.br
.RI "\fIFlags to pass into the <SVC_HANDLER::activate> method.\fR"
.ti -1c
.RI "size_t \fBn_threads_\fR"
.br
.RI "\fINumber of threads to spawn.\fR"
.in -1c
.SH DETAILED DESCRIPTION
.PP 

.SS template<class SVC_HANDLER>  template class ACE_Thread_Strategy
Defines the interface for specifying a concurrency strategy for a <SVC_HANDLER> based on multithreading.
.PP
.PP
 This class provides a strategy that manages the creation of threads to handle requests from clients concurrently. It behaves as a "thread factory", spawning threads "on-demand" to run the service specified by a user-supplied <SVC_HANDLER>. 
.PP
.SH MEMBER TYPEDEF DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER> typedef \fBACE_Concurrency_Strategy\fR<SVC_HANDLER> ACE_Thread_Strategy<SVC_HANDLER>::inherited\fC [protected]\fR
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER> ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy<SVC_HANDLER> (int flags = 0)
.PP
"Do-nothing constructor".
.PP
.SS template<classSVC_HANDLER> ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy<SVC_HANDLER> (\fBACE_Thread_Manager\fR * tm, long thr_flags, size_t n_threads = 1, int flags = 0)
.PP
Initialize the strategy.
.PP
.SS template<classSVC_HANDLER> virtual ACE_Thread_Strategy<SVC_HANDLER>::~ACE_Thread_Strategy<SVC_HANDLER> (void)\fC [virtual]\fR
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER> int ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER * svc_handler, void * arg = 0)\fC [virtual]\fR
.PP
Activate the <svc_handler> with an appropriate concurrency strategy. This method activates the SVC_HANDLER by first calling its <open> method and then calling its  method to turn it into an active object. 
.PP
Reimplemented from \fBACE_Concurrency_Strategy\fR.
.SS template<classSVC_HANDLER> void ACE_Thread_Strategy<SVC_HANDLER>::dump (void) const
.PP
Dump the state of an object.
.PP
Reimplemented from \fBACE_Concurrency_Strategy\fR.
.SS template<classSVC_HANDLER> int ACE_Thread_Strategy<SVC_HANDLER>::open (\fBACE_Thread_Manager\fR * tm, long thr_flags, size_t n_threads = 1, int flags = 0)\fC [virtual]\fR
.PP
Initialize the strategy.
.PP
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER> ACE_Thread_Strategy<SVC_HANDLER>::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
Reimplemented from \fBACE_Concurrency_Strategy\fR.
.SS template<classSVC_HANDLER> size_t ACE_Thread_Strategy<SVC_HANDLER>::n_threads_\fC [protected]\fR
.PP
Number of threads to spawn.
.PP
.SS template<classSVC_HANDLER> long ACE_Thread_Strategy<SVC_HANDLER>::thr_flags_\fC [protected]\fR
.PP
Flags to pass into the <SVC_HANDLER::activate> method.
.PP
.SS template<classSVC_HANDLER> \fBACE_Thread_Manager\fR * ACE_Thread_Strategy<SVC_HANDLER>::thr_mgr_\fC [protected]\fR
.PP
Thread manager for this class (must be provided).
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.