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

Tracking issue for std::sync::Once poisoning #33577

Open
durka opened this Issue May 12, 2016 · 4 comments

Comments

Projects
None yet
7 participants
@durka
Copy link
Contributor

durka commented May 12, 2016

This tracks the once_poison feature, which currently covers the following things under std::sync::once:

  • OnceState, a struct describing the poisonedness of a Once
  • OnceState::poisoned, which reveals said poisonedness
  • Once::call_once_force, which is like call_once but ignores poisoning

durka added a commit to durka/rust that referenced this issue May 12, 2016

update tracking issue for once_poison
The tracking issue for once_poison was noted as rust-lang#31688 which was closed, so it now points to the new rust-lang#33577.

durka added a commit to durka/rust that referenced this issue May 21, 2016

update tracking issue for once_poison
The tracking issue for once_poison was noted as rust-lang#31688 which was closed, so it now points to the new rust-lang#33577.

Manishearth added a commit to Manishearth/rust that referenced this issue May 21, 2016

Rollup merge of rust-lang#33578 - durka:patch-21, r=alexcrichton
update tracking issue for once_poison

The tracking issue for once_poison was noted as rust-lang#31688 which was closed, so it now points to the new rust-lang#33577.
@brson

This comment has been minimized.

Copy link
Contributor

brson commented Dec 29, 2016

This issue is primarily about the call_once_force method. Once implements poisoning, and this method is how you get around a poisoned Once.

@frewsxcv

This comment has been minimized.

Copy link
Member

frewsxcv commented Oct 21, 2017

Anyone have insight why poisoned is not just a method on Once?

EDIT: nevermind

@dtolnay

This comment has been minimized.

Copy link
Member

dtolnay commented Nov 19, 2017

This naming seems inconsistent:

Could they both be is_poisoned since that one is stable already? Or is poisoned better enough that we should deprecate and rename the one on Mutex?

@joshlf

This comment has been minimized.

Copy link
Contributor

joshlf commented Nov 19, 2017

Relevant: #43448 contains discussion of whether forking a process should cause poisoning of various synchronization primitives. TLDR: An option is to make it so that if you fork while a Once is in use, thus invalidating it, that Once becomes poisoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.