summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/Thread/Task.cpp
diff options
context:
space:
mode:
authorAlexApps99 <alex.apps99@gmail.com>2021-07-26 21:58:51 +1200
committerAlexApps99 <alex.apps99@gmail.com>2021-07-26 23:05:19 +1200
commit42807160cfb33af9f3cf2fa6b0ba98f232208cdb (patch)
tree95b1b16a3f4cf7d0ab51e90b3d73e53f74ba7f2b /src/KingSystem/Utils/Thread/Task.cpp
parent88bcc9eec1481b47361dc717c83e4953e8929a2b (diff)
Add #ifdef declarations for NON_MATCHING code
Diffstat (limited to 'src/KingSystem/Utils/Thread/Task.cpp')
-rw-r--r--src/KingSystem/Utils/Thread/Task.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/KingSystem/Utils/Thread/Task.cpp b/src/KingSystem/Utils/Thread/Task.cpp
index e2ba464f..71cf18f5 100644
--- a/src/KingSystem/Utils/Thread/Task.cpp
+++ b/src/KingSystem/Utils/Thread/Task.cpp
@@ -34,7 +34,8 @@ void Task::deleteDelegate_() {
}
}
-// NON_MATCHING: mDelegate2 = nullptr store
+// mDelegate2 = nullptr store
+#ifdef NON_MATCHING
void Task::finalize_() {
if (mStatus == Status::Finalized)
return;
@@ -47,6 +48,7 @@ void Task::finalize_() {
mRemoveCallback = nullptr;
mStatus = Status::Finalized;
}
+#endif
bool Task::setDelegate(const TaskDelegateSetter& setter) {
mDelegate = setter.getDelegate();
@@ -56,7 +58,8 @@ bool Task::setDelegate(const TaskDelegateSetter& setter) {
return onSetDelegate_(setter);
}
-// NON_MATCHING: branching
+// branching
+#ifdef NON_MATCHING
bool Task::submitRequest(TaskRequest& request) {
// Processing this request is impossible if there is no thread *and* no queue!
if (request.mThread == nullptr && request.mQueue == nullptr)
@@ -114,6 +117,7 @@ bool Task::submitRequest(TaskRequest& request) {
}
return push_ok || b;
}
+#endif
bool Task::canSubmitRequest() const {
const bool run_finished_on_current_thread =