-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add OnceCell::wait #102
Comments
For what it's worth, my opinion is that the addition of this API is a much better idea than making |
Ironically, I need this now for http://github.com/near/nearcore/ :D |
Hm, it's interesting that this is slightly not-trivial. Today, when a thread does With |
work for near#6826 The ideal fix here would be to go and fix matklad/once_cell#102 but I am somewhat hesitant to just hack something on top of weak atomics on the spot :)
177: add OnceCell::wait r=matklad a=matklad issue: #102 Co-authored-by: Aleksey Kladov <[email protected]>
179: publish v1.12.0 r=matklad a=matklad closes #102 Co-authored-by: Aleksey Kladov <[email protected]>
This seems plausible:
The implementaiton should basically stuff the current thread into the waiters list, without attempting to set the value.
The text was updated successfully, but these errors were encountered: