ember-cli-new-version icon indicating copy to clipboard operation
ember-cli-new-version copied to clipboard

yield inside ember-concurrency finally block

Open bgentry opened this issue 6 years ago • 4 comments

On this line you're yielding within a finally. This is not really a good idea per https://github.com/machty/ember-concurrency/issues/185

bgentry avatar Jun 10 '18 08:06 bgentry

Any idea what an alternative might be?

knownasilya avatar Jun 10 '18 17:06 knownasilya

I think you might be able to restructure the tasks so there is a main task which just does a while loop and calls a subtask. Then the sleep can happen in the primary task (after the subtask completes) and the finally / rescue scenario can happen in the child task.

That's one idea, there are probably at least a few other ways that would work.

bgentry avatar Jun 11 '18 03:06 bgentry

@bgentry think you could submit a PR for this?

knownasilya avatar Jun 11 '18 19:06 knownasilya

yeah, I should be able to do that soon

bgentry avatar Jun 11 '18 22:06 bgentry