gpui: Remove unsound await_on_background helper - #56132
Merged
Merged
Conversation
Veykril
force-pushed
the
push-xswqmsotmmyx
branch
4 times, most recently
from
May 8, 2026 06:50
08a8371 to
2f0bfbd
Compare
Veykril
commented
May 8, 2026
Veykril
left a comment
Member
Author
There was a problem hiding this comment.
The language crate changes are merely switching out the async model to be impl Future where the Future is effectively 'static so we can offload it to the background.
SomeoneToIgnore
approved these changes
May 8, 2026
SomeoneToIgnore
left a comment
Contributor
There was a problem hiding this comment.
Would be nice to
- get some elaboration on unsoundness in the PR description as it's always interesting
- have a way to avoid repeating
impl Future<Output = T> + use<>and use some shorter form
but nothing blocking.
| ) | ||
| .await; | ||
| delegate: &Arc<dyn LspAdapterDelegate>, | ||
| ) -> impl Send + Future<Output = Option<lsp::LanguageServerBinary>> + use<> { |
Contributor
There was a problem hiding this comment.
I wonder if some generic type alias is ok to have for this?
Maybe not in gpui or other public place, but some utils/runtime crate?
Member
Author
There was a problem hiding this comment.
would need to be a trait alias which is not a stable thing yet
Contributor
There was a problem hiding this comment.
Or impl Foo for Send + ... and require that instead?
Either way, not too big of a deal.
Veykril
enabled auto-merge
May 8, 2026 09:09
3 tasks
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
The function is unsound due to the classic fact that one can leak tasks, sidestepping the blocking drop behavior resulting in a use after free. Release Notes: - N/A or Added/Fixed/Improved ...
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
The function is unsound due to the classic fact that one can leak tasks, sidestepping the blocking drop behavior resulting in a use after free. Release Notes: - N/A or Added/Fixed/Improved ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The function is unsound due to the classic fact that one can leak tasks, sidestepping the blocking drop behavior resulting in a use after free.
Release Notes: