![]() |
libfilezilla
|
A dumb thread-pool for asynchronous tasks. More...
#include <thread_pool.hpp>
Public Member Functions | |
| thread_pool (thread_pool const &)=delete | |
| thread_pool & | operator= (thread_pool const &)=delete |
| async_task | spawn (std::function< void()> const &f) |
| Spawns a new asynchronous task. | |
| async_task | spawn (std::function< void()> &&f) |
Friends | |
| class | async_task |
| class | pooled_thread_impl |
A dumb thread-pool for asynchronous tasks.
If there are no idle threads, threads are created on-demand if spawning an asynchronous task. Once an asynchronous task finishes, the corresponding thread is kept idle until the pool is destroyed.
Any number of tasks can be run concurrently.
1.8.10