From 57a1091dfb2c6403cbe63c7ddca8acc7e3d0f940 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 20 Aug 2018 23:51:16 +0200 Subject: Switch to https://git.tomsmeding.com/competition --- competition/job.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 competition/job.h (limited to 'competition/job.h') diff --git a/competition/job.h b/competition/job.h deleted file mode 100644 index 9dba159..0000000 --- a/competition/job.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -using namespace std; - - -class Scheduler { - struct Job { - function callback; - - Job(const function callback) - : callback(callback) {} - }; - - queue jobs; - bool terminateFlag = false; - mutex commMut; - - vector workers; - - void workerEntry(); - -public: - const int nthreads; - - Scheduler(int nthreads); - ~Scheduler(); - - // func is run in child thread - // doneCallback is run in host thread - void submit(const function &func); - - void finish(); -}; -- cgit v1.2.3-54-g00ecf