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

Bug: runtime spawn_batch does not release permit correctly #8183

Closed
dantengsky opened this issue Oct 13, 2022 · 2 comments
Closed

Bug: runtime spawn_batch does not release permit correctly #8183

dantengsky opened this issue Oct 13, 2022 · 2 comments
Assignees
Labels
C-bug Category: something isn't working

Comments

@dantengsky
Copy link
Member

dantengsky commented Oct 13, 2022

Summary

on behalf of @Xuanwo

in runtime try_spawn_batch

            let handler = self.handle.spawn(async move {
                // take the ownership of the permit, (implicitly) drop it when task is done
                let _ = permit;  // <- compiler will drop permit here, instead of at the end of async block
                fut.await
            });

@dantengsky dantengsky added C-feature Category: feature C-bug Category: something isn't working labels Oct 13, 2022
@dantengsky dantengsky self-assigned this Oct 13, 2022
@dantengsky dantengsky removed the C-feature Category: feature label Oct 13, 2022
@BohuTANG
Copy link
Member

Fixed in 1e59548
Merged to the main branch.

@dantengsky
Copy link
Member Author

addressed in pr #8153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants