mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
perf.以一种更安全的方式禁用SubTask
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
#include "PackageTask.h"
|
||||
|
||||
#include "Resource.h"
|
||||
#include "Logger.hpp"
|
||||
|
||||
bool asst::PackageTask::run()
|
||||
{
|
||||
if (!m_enable) {
|
||||
Log.info("task is disable, pass", basic_info().to_string());
|
||||
return true;
|
||||
}
|
||||
m_runned = true;
|
||||
|
||||
const auto task_delay = Resrc.cfg().get_options().task_delay;
|
||||
@@ -12,9 +17,6 @@ bool asst::PackageTask::run()
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
if (!task_ptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
task_ptr->set_exit_flag(m_exit_flag)
|
||||
.set_ctrler(m_ctrler)
|
||||
|
||||
Reference in New Issue
Block a user