| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

shutdown_policies.hpp
Go to the documentation of this file.
1
19 #ifndef THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
20 #define THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
21
22
23
25 namespace boost { namespace threadpool
26 {
27
28
34 template<typename Pool>
35 class wait_for_all_tasks
36 {
37 public:
38 static void shutdown(Pool& pool)
39 {
40 pool.wait();
41 pool.terminate_all_workers(true);
42 }
43 };
44
45
51 template<typename Pool>
52 class wait_for_active_tasks
53 {
54 public:
55 static void shutdown(Pool& pool)
56 {
57 pool.clear();
58 pool.wait();
59 pool.terminate_all_workers(true);
60 }
61 };
62
63
70 template<typename Pool>
71 class immediately
72 {
73 public:
74 static void shutdown(Pool& pool)
75 {
76 pool.clear();
77 pool.terminate_all_workers(false);
78 }
79 };
80
81 } } // namespace boost::threadpool
82
83 #endif // THREADPOOL_SHUTDOWN_POLICIES_HPP_INCLUDED
boost::threadpool::immediately::shutdown
static void shutdown(Pool &pool)
Definition: shutdown_policies.hpp:74
boost::threadpool::wait_for_all_tasks
ShutdownPolicy which waits for the completion of all tasks and the worker termination afterwards...
Definition: shutdown_policies.hpp:35
boost
The namespace threadpool contains a thread pool and related utility classes.
Definition: iter_pos.hpp:13
boost::threadpool::immediately
ShutdownPolicy which does not wait for any tasks or worker termination.
Definition: shutdown_policies.hpp:71
boost::threadpool::wait_for_all_tasks::shutdown
static void shutdown(Pool &pool)
Definition: shutdown_policies.hpp:38
boost::threadpool::wait_for_active_tasks
ShutdownPolicy which waits for the completion of all active tasks and the worker termination afterwar...
Definition: shutdown_policies.hpp:52
boost::threadpool::wait_for_active_tasks::shutdown
static void shutdown(Pool &pool)
Definition: shutdown_policies.hpp:55
pool
Definition: PoolClasses.h:11