taskgroup icon indicating copy to clipboard operation
taskgroup copied to clipboard

Pause/Resume support

Open knightus opened this issue 7 years ago • 1 comments

I felt great when found out this awesome lib, which fit my needs when there's support for nested/grouping. Thank you very much.

But when being hooked into it, I think that it lacks the ability to pause/resume the task/group (on purpose).

I have been able to pause/resume the taskgroup (the running task still run), by:

  • Add a new status: paused
  • Add 2 methods:
    • pause(): Change this.state.status to paused
    • resume(): Change this.state.status to false & run the queue again (this.run())
  • Update some status checks

Not sure if there's any official guide for pause/resume, or someone already working on it. If my changes are going to the right direction, I can create a PR for it so you can take a look :) I guess there must be other places need to be updated accordingly :)

knightus avatar Feb 15 '19 19:02 knightus

Older releases had the ability to pause and resume, however I pulled it. Perhaps the reasoning is in the commit history, changelog, or issue tracker somewhere, as I cannot remember why. Perhaps it was just too difficult at the time.

balupton avatar Dec 18 '19 05:12 balupton