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>
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>
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>
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
static void shutdown(Pool &pool)
ShutdownPolicy which waits for the completion of all tasks and the worker termination afterwards...
The namespace threadpool contains a thread pool and related utility classes.
ShutdownPolicy which does not wait for any tasks or worker termination.
ShutdownPolicy which waits for the completion of all active tasks and the worker termination afterwar...


asr_descriptor_surface_based_recognition
Author(s): Allgeyer Tobias, Hutmacher Robin, Mei├čner Pascal
autogenerated on Mon Dec 16 2019 03:31:15