Skip to content

how to shuntdown the pool when there is a endless loop in the task  #1

Description

@youngfn

Hi, guys. I want to ask have you considered when a task has an endless loop and client want to cancel it. How to deal with this scenario?

`auto resultOf34 = thread_pool.Schedule(
{
int i = 3 * 4;
print(std::to_string(i));
while(true){
std::cout << "working!!!" << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
}
return i;
});

`
Thx in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions