the-moisrex / webpp

C++ web framework | web development can be done with C++ as well.
https://t.me/webpp
MIT License
129 stars 9 forks source link

Generator Pool #561

Open the-moisrex opened 3 hours ago

the-moisrex commented 3 hours ago
template <Generator GenT, std::size_t PoolSize = 10, Locker LockT = std::conditional_t<PoolSize == 1, noop_locker, unique_lock>>
struct generator_pool;
the-moisrex commented 3 hours ago

GenT can has its own data-race protection mechanisms like atomic<int>; so the locking system needs to be smarter.