From 81cf121b54efa28e1b278bc6fb15cb8695a30d4e Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Fri, 15 Apr 2016 14:43:04 +0200 Subject: [PATCH] Got rid of the DelayedTask as it is no longer needed --- platform.cpp | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/platform.cpp b/platform.cpp index bb8153d..b840f2c 100644 --- a/platform.cpp +++ b/platform.cpp @@ -35,54 +35,6 @@ static std::mutex mutex; */ static std::atomic platform; -/** - * Execute a v8::Task with a bit of delay, like we want in the CallDelayedOnForegroundThread - * method. - */ -class DelayedTask : public v8::Task -{ -private: - /** - * The underlying task we want to execute - * @var v8::Task - */ - v8::Task *_task; - - /** - * The amount of delay that we want before executing the task - * @var double - */ - double _delay; - -public: - /** - * Constructor - * @param task - * @param delay - */ - DelayedTask(v8::Task *task, double delay) : _task(task), _delay(delay) {} - - /** - * Destructor, we delete the underlying task from here - */ - virtual ~DelayedTask() - { - delete _task; - } - - /** - * The abstract Run method of the v8::Task interface - */ - void Run() override - { - // so first we sleep for '_delay' seconds - std::this_thread::sleep_for(std::chrono::duration(_delay)); - - // and then we run the actual task - _task->Run(); - } -}; - /** * Include the dumps of the natives and snapshot blobs */