1 #ifndef LIBFILEZILLA_THREAD_POOL_HEADER 2 #define LIBFILEZILLA_THREAD_POOL_HEADER 18 class pooled_thread_impl;
39 explicit operator bool()
const {
return impl_ !=
nullptr; }
46 friend class pooled_thread_impl;
48 pooled_thread_impl* 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.
Handle for asynchronous tasks.
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
A dumb thread-pool for asynchronous tasks.
Definition: thread_pool.hpp:59