Diffstat (limited to 'include/sitecing/process_manager.h') (more/less context) (show whitespace changes)
-rw-r--r-- | include/sitecing/process_manager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sitecing/process_manager.h b/include/sitecing/process_manager.h index 73415d3..921f159 100644 --- a/include/sitecing/process_manager.h +++ b/include/sitecing/process_manager.h | |||
@@ -9,81 +9,81 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | namespace sitecing { | 11 | namespace sitecing { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * The process manager. | 14 | * The process manager. |
15 | */ | 15 | */ |
16 | class process_manager { | 16 | class process_manager { |
17 | public: | 17 | public: |
18 | /** | 18 | /** |
19 | * Minimum number of child processes. | 19 | * Minimum number of child processes. |
20 | */ | 20 | */ |
21 | int min_children; | 21 | int min_children; |
22 | /** | 22 | /** |
23 | * Maxinum number of child processes. | 23 | * Maxinum number of child processes. |
24 | */ | 24 | */ |
25 | int max_children; | 25 | int max_children; |
26 | /** | 26 | /** |
27 | * Minimum number of spare child processes. | 27 | * Minimum number of spare child processes. |
28 | */ | 28 | */ |
29 | int min_spare_children; | 29 | int min_spare_children; |
30 | /** | 30 | /** |
31 | * Maxiumum number of spare child processes. | 31 | * Maxiumum number of spare child processes. |
32 | */ | 32 | */ |
33 | int max_spare_children; | 33 | int max_spare_children; |
34 | /** | 34 | /** |
35 | * The scoreboard. | 35 | * The scoreboard. |
36 | */ | 36 | */ |
37 | scoreboard sboard; | 37 | scoreboard sboard; |
38 | /** | 38 | /** |
39 | * We're in the process of shutting down. | 39 | * We're in the process of shutting down. |
40 | */ | 40 | */ |
41 | bool finishing; | 41 | bool finishing; |
42 | /** | 42 | /** |
43 | * @todo TODO: wish I could rememer -- document me. | 43 | * @todo TODO: wish I could rememer -- document me. |
44 | */ | 44 | */ |
45 | bool die_humbly; | 45 | bool die_humbly; |
46 | 46 | ||
47 | process_manager(); | 47 | process_manager(); |
48 | virtual ~process_manager(); | 48 | virtual ~process_manager(); |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * The main loop. | 51 | * The main loop. |
52 | */ | 52 | */ |
53 | void manage(); | 53 | void manage(); |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * The worker function. | 56 | * The worker function. |
57 | * @param the slot allocated for the process. | 57 | * @param slot the slot allocated for the process. |
58 | */ | 58 | */ |
59 | virtual void process(int slot) = 0; | 59 | virtual void process(int slot) = 0; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * @todo TODO: wish I could remember -- document me. | 62 | * @todo TODO: wish I could remember -- document me. |
63 | */ | 63 | */ |
64 | void manage_children(); | 64 | void manage_children(); |
65 | /** | 65 | /** |
66 | * @todo TODO: wish I could remember -- document me. | 66 | * @todo TODO: wish I could remember -- document me. |
67 | */ | 67 | */ |
68 | bool spawn_children(); | 68 | bool spawn_children(); |
69 | /** | 69 | /** |
70 | * @todo TODO: wish I could remember -- document me. | 70 | * @todo TODO: wish I could remember -- document me. |
71 | */ | 71 | */ |
72 | bool kill_children(); | 72 | bool kill_children(); |
73 | /** | 73 | /** |
74 | * @todo TODO: wish I could remember -- document me. | 74 | * @todo TODO: wish I could remember -- document me. |
75 | */ | 75 | */ |
76 | void spawn_child(); | 76 | void spawn_child(); |
77 | /** | 77 | /** |
78 | * @todo TODO: wish I could remember -- document me. | 78 | * @todo TODO: wish I could remember -- document me. |
79 | */ | 79 | */ |
80 | void wait_for_children(bool hang=false); | 80 | void wait_for_children(bool hang=false); |
81 | /** | 81 | /** |
82 | * @todo TODO: wish I could remember -- document me. | 82 | * @todo TODO: wish I could remember -- document me. |
83 | */ | 83 | */ |
84 | void collect_dead_souls(bool actively=false); | 84 | void collect_dead_souls(bool actively=false); |
85 | }; | 85 | }; |
86 | 86 | ||
87 | } | 87 | } |
88 | 88 | ||
89 | #endif /* __SITECING_PROCESS_MANAGER_H */ | 89 | #endif /* __SITECING_PROCESS_MANAGER_H */ |