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

make_ready_future and make_exceptional_future should use the immediate executor #65

Closed
fosterbrereton opened this issue Jul 10, 2017 · 1 comment

Comments

@fosterbrereton
Copy link
Member

It seems very expensive to use the default_executor in creating the ready and exceptional executors. Wouldn't it make more sense to use the immediate_executor?

@fosterbrereton fosterbrereton changed the title make_ready_future and make_exceptional_future should use the immediate executor make_ready_future and make_exceptional_future should use the immediate executor Jul 10, 2017
@sean-parent
Copy link
Member

The default_executor is used for scheduling continuations (.then() ) and does not impose any more cost on the resolving the future than the immediate_executor would. Using an immediate executor for a continuation can cause surprising behaviors - we choose to be consistent and use the default_executor as the default.

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