-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove unwrap_shared_mutable_state #4436
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
Comments
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? |
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., |
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? |
Mostly because that's not such a clean design. I'll also note that unwrap has bugs: #4689 |
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. |
Given that #4689 is fixed, I'm gonna vote for WONTFIXing this. |
…atsakis r? This fixes the current [random failures](http://buildbot.rust-lang.org/builders/auto-linux/builds/291/steps/test/logs/stdio) on the bots and closes #4436 by removing `unwrap_shared_mutable_state` and the code that depends on it. The result is that ARC-like things will not be unwrappable. This feature is complex and is not used outside of test cases. Note that there is not consensus to remove it. (second commit)
I've done this against your objection, @bblum. Sorry. |
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.
The text was updated successfully, but these errors were encountered: