This commit is contained in:
parent
4a7c76cc1c
commit
9c5166b921
@ -107,6 +107,11 @@ void tasks::task_thread() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
task.action(stop_requested_);
|
task.action(stop_requested_);
|
||||||
|
if (stop_requested_) {
|
||||||
|
release();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(task.delay_ms));
|
std::this_thread::sleep_for(std::chrono::milliseconds(task.delay_ms));
|
||||||
--count_;
|
--count_;
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user