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

Require stack to be 'static #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zetanumbers
Copy link
Contributor

Fixes #43

@zetanumbers zetanumbers marked this pull request as ready for review December 5, 2024 13:52
@zetanumbers zetanumbers marked this pull request as draft December 5, 2024 14:05
@zetanumbers zetanumbers marked this pull request as ready for review December 5, 2024 14:09
@zetanumbers
Copy link
Contributor Author

Unfortunately changes to the coroutine_call benchmark slowed it down by around +108% of cycles and +69% of time. Should I add with_stack_unchecked and use it from the benchmark? Not sure what exact safety rules would I write for it.

@Amanieu
Copy link
Owner

Amanieu commented Dec 5, 2024

Maybe we should have a with_scoped_stack constructor that takes a non-'static stack and allows you to use it only within a closure. This should avoid the issue with forgetting a coroutine.

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

Successfully merging this pull request may close these issues.

Coroutine should require 'static stack too
2 participants