summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/server/Task.hpp32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/server/Task.hpp b/src/server/Task.hpp
index 22f72997..99fe347d 100644
--- a/src/server/Task.hpp
+++ b/src/server/Task.hpp
@@ -46,37 +46,18 @@ public:
, _done(false)
{
assert(block);
+ assert(!(_mode == Mode::SINGLE && !_block));
}
- Task(Mode mode, BlockImpl* block = nullptr)
- : _block(block)
+ Task(Mode mode)
+ : _block(nullptr)
, _mode(mode)
, _done_end(0)
, _next(0)
, _done(false)
{
- assert(!(mode == Mode::SINGLE && !block));
- }
-
- Task(Task&& task)
- : _children(std::move(task._children))
- , _block(task._block)
- , _mode(task._mode)
- , _done_end(task._done_end)
- , _next(task._next.load())
- , _done(task._done.load())
- {}
-
- Task& operator=(Task&& task)
- {
- _children = std::move(task._children);
- _block = task._block;
- _mode = task._mode;
- _done_end = task._done_end;
- _next = task._next.load();
- _done = task._done.load();
- return *this;
+ assert(!(_mode == Mode::SINGLE && !_block));
}
/** Run task in the given context. */
@@ -100,11 +81,6 @@ public:
}
/** Prepend a child to this task. */
- void push_front(Task&& task) {
- _children.emplace_front(std::unique_ptr<Task>(new Task(std::move(task))));
- }
-
- /** Prepend a child to this task. */
template<typename... Args>
void emplace_front(Args... args) {
_children.emplace_front(std::unique_ptr<Task>(new Task(std::forward<Args>(args)...)));