Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yield inside ember-concurrency finally block #44

Open
bgentry opened this issue Jun 10, 2018 · 4 comments
Open

yield inside ember-concurrency finally block #44

bgentry opened this issue Jun 10, 2018 · 4 comments

Comments

@bgentry
Copy link
Contributor

bgentry commented Jun 10, 2018

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

@knownasilya
Copy link
Collaborator

Any idea what an alternative might be?

@bgentry
Copy link
Contributor Author

bgentry commented Jun 11, 2018

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.

@knownasilya
Copy link
Collaborator

@bgentry think you could submit a PR for this?

@bgentry
Copy link
Contributor Author

bgentry commented Jun 11, 2018

yeah, I should be able to do that soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants