Skip to content

Remove unwrap_shared_mutable_state #4436

Closed

Description

@brson

We're about to start rewriting the runtime in Rust and need concurrency primitives, particulary atomic reference counting for schedulers, etc. This one feature makes some complicated calls into the runtime, making most of our primitives unusable for this task.

Activity

  1. bblum commented on Jan 11, 2013

    @bblum
    Contributor

    Removing unwrap will mean that once data is put into an ARC, MutexARC, or RWARC, it can never be owned again short of a deep copy.

    I don't understand the issue here at all, though. It doesn't use any rustrt calls, only intrinsics (transmute, forget, cmpxchg). What's the problem?

  2. brson commented on Jan 11, 2013

    @brson
    ContributorAuthor

    That's fine with me. I don't have any use cases yet where I need to stop atomically reference counting something.

    It interacts with the runtime because it uses pipes, which must be able to yield, resume, etc., task::killable, task::failing.

  3. bblum commented on Jan 11, 2013

    @bblum
    Contributor

    Oh, I see, you're saying there could be a circular functionality dependency. Why not just abstain from using it in the runtime's use cases, leaving it in for higher-level applications?

  4. brson commented on Feb 4, 2013

    @brson
    ContributorAuthor

    Mostly because that's not such a clean design. I'll also note that unwrap has bugs: #4689

  5. bblum commented on Feb 4, 2013

    @bblum
    Contributor

    I dunno. I think unwrap is a useful enough extension to the primitive (it enables a quick fork-many/join-many pattern) to warrant keeping.

    As for the bug... ouch. I'll try to have a look at it soon. Hopefully just a bug in the test case.

  6. bblum commented on Feb 28, 2013

    @bblum
    Contributor

    Given that #4689 is fixed, I'm gonna vote for WONTFIXing this.

  7. added a commit that references this issue on Mar 1, 2013
    916d1a9
  8. brson commented on Mar 1, 2013

    @brson
    ContributorAuthor

    I've done this against your objection, @bblum. Sorry.

  9. added a commit that references this issue on Jul 5, 2025
  10. added a commit that references this issue on Aug 21, 2026
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: ConcurrencyE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions