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

Call Swift connection close callback from global executor #2635

Closed
wants to merge 2 commits into from

Conversation

externl
Copy link
Member

@externl externl commented Aug 7, 2024

This PR changes the behavior of the Connection close callback to call back from a Swift global executor thread and not a C++ thread pool thread. It also updates the callback to be async.

I think this is the last place where C++ threads could call into Swift user code.

@bernardnormier
Copy link
Member

I prefer to keep the synchronous callback. From the C++ point of view, this callback is a synchronous callback that should not block, and it's fine for the Swift code to use the C++ thread. If the Swift code needs to call an async function as part of this callback, it can/should create a Task.

@externl externl closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants