memgraph/threading/worker.hpp
2015-08-30 01:12:46 +02:00

23 lines
316 B
C++

#ifndef MEMGRAPH_THREADING_WORKER_HPP
#define MEMGRAPH_THREADING_WORKER_HPP
#include <thread>
template <class F, class... Args>
class Worker
{
public:
Worker(F&& f, Args&&... args)
: thread(f, args...) {}
void join()
{
thread.join();
}
private:
std::thread thread;
};
#endif