1 #ifndef LIBFILEZILLA_THREAD_POOL_HEADER
2 #define LIBFILEZILLA_THREAD_POOL_HEADER
21 class async_task_impl;
39 explicit operator bool()
const {
return impl_ !=
nullptr; }
47 async_task_impl* impl_{};
58 class pooled_thread_impl;
69 async_task spawn(std::function<
void()>
const& f);
73 friend class pooled_thread_impl;
75 std::vector<pooled_thread_impl*> threads_;
76 std::vector<pooled_thread_impl*> idle_;
Thread synchronization primitives: mutex, scoped_lock and condition.
Definition: thread_pool.hpp:22
The namespace used by libfilezilla.
Definition: apply.hpp:16
Sets some global macros and further includes string.hpp.
Lean replacement for std::(recursive_)mutex.
Definition: mutex.hpp:27
Definition: thread_pool.hpp:59