libtasks Documentation
1.6
Main Page
Namespaces
Classes
Files
File List
File Members
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
13
void
task::finish
(
worker
*
worker
) {
14
for
(
auto
f :
m_finish_funcs
) {
15
f(worker);
16
}
17
dispatcher::instance
()->remove_task(
this
);
18
}
19
20
}
// tasks
tasks::dispatcher::instance
static std::shared_ptr< dispatcher > instance()
Definition:
dispatcher.h:75
tasks::worker
Definition:
worker.h:55
tasks::task::finish
void finish(worker *worker=nullptr)
Called by a worker when a task has auto_deletion enabled.
Definition:
task.cpp:13
dispatcher.h
task.h
tasks::task::m_finish_funcs
std::vector< finish_func_t > m_finish_funcs
Definition:
task.h:71
tasks
task.cpp
Generated by
1.8.6