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

fix: allocate callback immediately on heap in debug mode #4203

Merged
merged 1 commit into from Oct 29, 2021

Conversation

sander2
Copy link
Contributor

@sander2 sander2 commented Oct 28, 2021

Addresses #4202. I have not been able to verify whether or not this fixes my issue with the stack overflow, due to it being a transitive dependency for me. However, the approach is very similar to the one taken in #4009, as suggested by @Darksonn in the issue. The only difference is that here the argument is a FnOnce instead of a Future. I'm not sure if that makes a difference with regard to stack usage.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

tokio/src/runtime/handle.rs Show resolved Hide resolved
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-task Module: tokio/task labels Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-task Module: tokio/task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants