A simple fixed-size thread pool.
class thread_pool : public execution_context
Name |
Description |
---|---|
Executor used to submit functions to a thread pool. |
|
Fork-related event notifications. |
Name |
Description |
---|---|
Obtains the executor associated with the pool. |
|
Joins the threads. |
|
Notify the execution_context of a fork-related event. |
|
Stops the threads. |
|
Constructs a pool with an automatically determined number of threads. Constructs a pool with a specified number of threads. |
|
Destructor. |
Name |
Description |
---|---|
Destroys all services in the context. |
|
Shuts down all services in the context. |
Name |
Description |
---|---|
(Deprecated: Use make_service().) Add a service object to the execution_context. |
|
Determine if an execution_context contains a specified service type. |
|
Creates a service object and adds it to the execution_context. |
|
Obtain the service object corresponding to the given type. |
The thread pool class is an execution context where functions are permitted to run on one of a fixed number of threads.
Header: asio/thread_pool.hpp
Convenience header: asio.hpp