libtasks Documentation  1.6
task.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2014 ADTECH GmbH
3  * Licensed under MIT (https://github.com/adtechlabs/libtasks/blob/master/COPYING)
4  *
5  * Author: Andreas Pohl
6  */
7 
8 #include <tasks/task.h>
9 #include <tasks/dispatcher.h>
10 
11 namespace tasks {
12 
14  for (auto f : m_finish_funcs) {
15  f(worker);
16  }
17  dispatcher::instance()->remove_task(this);
18 }
19 
20 } // tasks
static std::shared_ptr< dispatcher > instance()
Definition: dispatcher.h:75
void finish(worker *worker=nullptr)
Called by a worker when a task has auto_deletion enabled.
Definition: task.cpp:13
std::vector< finish_func_t > m_finish_funcs
Definition: task.h:71