TaskLib: Graceful stop

Feature request:
A generic way to gracefully stop tasks.

An example:

  • 2 new functions on the task lib:
    taskLib.stop(taskId) → Sets a volatible flag to true
    taskLib.shouldStop() → Called from inside the task. Retrieves the flag value
  • I guess this will the case, but also a possibility to access from Java the 2 underlying functions

In Explorer I used a node to achieve this:

See

It is doable today yes, but it would be better to have a generic way to achieve this. Common to all tasks instead of each one of us implementing its own way to listen to and to trigger stops.

3 Likes

I agree with @gri here - There should be a standard interface to stop tasks, and up to the developers to actually implement it.

We’ll get back with more details.

1 Like