Skip to content

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

Closed
@durka

Description

@durka
Contributor

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

Activity

added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
B-unstableBlocker: Implemented in the nightly compiler and unstable.
on May 12, 2016
added a commit that references this issue on May 21, 2016
added a commit that references this issue on May 21, 2016

Rollup merge of rust-lang#33578 - durka:patch-21, r=alexcrichton

brson

brson commented on Dec 29, 2016

@brson
Contributor

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

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jul 22, 2017
frewsxcv

frewsxcv commented on Oct 21, 2017

@frewsxcv
Member

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

EDIT: nevermind

dtolnay

dtolnay commented on Nov 19, 2017

@dtolnay
Member

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

joshlf commented on Nov 19, 2017

@joshlf
Contributor

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.

steveklabnik

steveklabnik commented on Sep 16, 2019

@steveklabnik
Member

Triage: no changes here that I'm aware of.

sanmai-NL

sanmai-NL commented on Apr 30, 2020

@sanmai-NL

#43448 was closed. @joshlf Can this issue be expedited, without discussing more than one scenario in which the state should be poisoned?

joshlf

joshlf commented on Apr 30, 2020

@joshlf
Contributor

Yes, the "poison on fork" proposal should be considered dead for the time being. The discussion in this issue can safely ignore that proposal.

Amanieu

Amanieu commented on Apr 30, 2020

@Amanieu
Member

I think this API is well designed and worth stabilizing. Note that parking_lot uses a difference OnceState, but I think the current one we have in libstd is fine as it is.

@rfcbot fcp merge

9 remaining items

removed
final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
on May 11, 2020
added
Libs-TrackedLibs issues that are tracked on the team's project board.
on Jul 29, 2020
Kixunil

Kixunil commented on Feb 3, 2021

@Kixunil
Contributor

Should this API stabilize after successful FCP or do I misunderstand stabilization process?

Amanieu

Amanieu commented on Feb 3, 2021

@Amanieu
Member

Someone needs to submit a stabilization PR for this feature.

Kixunil

Kixunil commented on Feb 4, 2021

@Kixunil
Contributor

@Amanieu OK, I decided to become that someone. :) Thanks for clarifying!

added 2 commits that reference this issue on Feb 4, 2021

Rollup merge of rust-lang#81745 - Kixunil:stabilize_once_poison, r=m-…

7066afb

Rollup merge of rust-lang#81745 - Kixunil:stabilize_once_poison, r=m-…

6f014cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-concurrencyArea: ConcurrencyB-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @steveklabnik@durka@alexcrichton@brson@Amanieu

      Issue actions

        Tracking issue for std::sync::Once poisoning · Issue #33577 · rust-lang/rust