Skip to content

Instantly share code, notes, and snippets.

@antaalt
antaalt / Worker.hpp
Last active July 12, 2020 15:26
Worker class to easily implement parallel tasks.
#pragma once
#include <queue>
#include <thread>
#include <mutex>
#include <atomic>
#include <condition_variable>
template <typename T>
class Worker {
public: