machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

resetState: true does not reset performCount #498

Open sebastianhelbig opened 1 year ago

sebastianhelbig commented 1 year ago

According to the docs it should, but it does not. This also seems untested.

cancelAll() options.resetState If true, will clear the task state (last* and performCount properties will be set to initial values). Defaults to false.

console.log(myTask.performCount); --> 2
await myTask.cancelAll({ resetState: true });
console.log(myTask.performCount); --> 2