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

Don't abort if the runtime is run twice. #9742

Merged
merged 1 commit into from
Oct 9, 2013

Conversation

alexcrichton
Copy link
Member

This changes an assert_once_ever! assertion to just a plain old assertion
around an atomic boolean to ensure that one particular runtime doesn't attempt
to exit twice.

Closes #9739

@drrb
Copy link

drrb commented Oct 6, 2013

Thanks for getting to this so quickly! I have a question about the fix. It seems like this was the only use of assert_once_ever in the libraries. Is this a general problem that will occur with all uses of assert_once_ever in the future? If so, would it be worth removing the macro, or modifying it to be assert_once_for_this_runtime_invocation (in the spirit of #7748)?

@brson
Copy link
Contributor

brson commented Oct 6, 2013

Can we remove the unused macro too please?

@alexcrichton
Copy link
Member Author

Updated with the macro removed, it may still have a use when doing something like initializing an FFI library, but I agree that it should probably be removed to prevent something like this in the future.

This changes an `assert_once_ever!` assertion to just a plain old assertion
around an atomic boolean to ensure that one particular runtime doesn't attempt
to exit twice.

Closes rust-lang#9739
bors added a commit that referenced this pull request Oct 9, 2013
This changes an `assert_once_ever!` assertion to just a plain old assertion
around an atomic boolean to ensure that one particular runtime doesn't attempt
to exit twice.

Closes #9739
@bors bors closed this Oct 9, 2013
@bors bors merged commit 8fcf62b into rust-lang:master Oct 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting Rust runtime twice (sequentially) fails
4 participants