summaryrefslogtreecommitdiffstats
path: root/engine/task.cpp
blob: 760b1b903cdf1efdf419382df59a86b3ed2ea00a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "core/task.hpp"

#include <functional>


namespace flat {
    namespace core {
        task::task(std::function<void()> callback, priority_t p)
            : m_callback(callback) {}

        void job::invoke_tasks() {
            for (const task& t : *this) {
                t();
            }
        }
    }
}