Closed JD31 closed 1 month ago
Unfortunately this is not possible, since the tasks are stored in an std::priority_queue, which has the property that once an element has been added to the queue, its priority cannot be changed.
If you tell me what exactly you are trying to do, I could provide ideas for how to implement it. For example, you could include a flag in the task itself that can be used to cancel it, and then if you want to change the priority, you can turn on that flag and resubmit the task.
When not started yet, is it possible to change the prioroty of a task ? Thank you.