ember-concurrency icon indicating copy to clipboard operation
ember-concurrency copied to clipboard

Last.running is not ok

Open beatrizdemiguelperez opened this issue 6 years ago • 1 comments

captura de pantalla 2018-07-17 a las 15 51 07

Hi,

If I am not wrong I think that task.get('lastRunning') should be the same as task.get('last') if the state of the last task is running. I upload a screenshot showing the problem.

Thanks!

beatrizdemiguelperez avatar Jul 18 '18 09:07 beatrizdemiguelperez

As far as I understand, It will happen when there are multiple request. Suppose you are executing the task by clicking on button. And if you click the button multiple time and the first request has yet to be resolved, then this will occur. Because every thing is inside run loop. You can verify it by doing console.log and printing the task.

If you want to cancel the previous operation, you can use restartable in that case.

baljeet03 avatar Jul 19 '18 11:07 baljeet03