Skip to content

gpui: Fix race condition when upgrading a weak reference #30952

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

Merged
merged 2 commits into from
May 30, 2025

Conversation

laizy
Copy link
Contributor

@laizy laizy commented May 19, 2025

Release Notes:

  • N/A

@maxdeviant maxdeviant changed the title gpui: fixes race condition to upgrade the weak reference gpui: Fix race condition when upgrading a weak reference May 19, 2025
@notpeter notpeter added the cla-signed The user has signed the Contributor License Agreement label May 19, 2025
})
let mut loaded = ref_count.load(SeqCst);
loop {
if loaded == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Rather than duplicating this logic, can we move it into a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@mikayla-maki
Copy link
Member

Thank you!

@mikayla-maki mikayla-maki enabled auto-merge (squash) May 30, 2025 15:15
@mikayla-maki mikayla-maki merged commit c4dbaa9 into zed-industries:main May 30, 2025
19 checks passed
@laizy laizy deleted the gpui branch May 31, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants