Skip to content

Instantly share code, notes, and snippets.

View dudoslav's full-sized avatar
👌
Startups are kind of permanent heckaton

Dušan Baran dudoslav

👌
Startups are kind of permanent heckaton
View GitHub Profile
@dudoslav
dudoslav / async.hpp
Created May 20, 2020 11:00
Async Pool
template<typename Fun, typename... Args>
class Pool {
std::vector<std::thread> _workers;
Queue<std::tuple<Args...>> _jobs;
std::mutex _mutex;
std::condition_variable _cv;
std::atomic<bool> _finished = false;
public:

Keybase proof

I hereby claim:

  • I am dudoslav on github.
  • I am dudoslav (https://keybase.io/dudoslav) on keybase.
  • I have a public key ASBXVHjW61eebvm6KtvDZWFjU6VjEh-jNho6BbyIMcCqrAo

To claim this, I am signing this object: