1 #ifndef LIBFILEZILLA_THREAD_POOL_HEADER 2 #define LIBFILEZILLA_THREAD_POOL_HEADER 18 class pooled_thread_impl;
37 explicit operator bool()
const {
return impl_ != 0; }
41 friend class pooled_thread_impl;
43 pooled_thread_impl* impl_{};
64 async_task spawn(std::function<
void()>
const& f);
68 friend class pooled_thread_impl;
70 std::vector<pooled_thread_impl*> threads_;
71 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:54