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

Stability for core::cmp, core::default, alloc::rc, std::task #15797

Merged
merged 4 commits into from Jul 20, 2014

Conversation

brson
Copy link
Contributor

@brson brson commented Jul 19, 2014

Summary:

  • alloc::rc module stable
  • Rc type stable
  • Functions relating to weak references experimental
  • core::cmp module stable
  • PartialEq/Eq/PartialOrd/Ord unstable because trait reform will make them change again
  • Equiv experimental because there may be better sol'ns
  • lexical_ordering deprecated because it can be done trivially with the Ord trait
  • min/max stable
  • std::task module stable
  • TaskBuilder::stdout/stderr experimental because we aren't certain we want to configure the environment this way
  • try_future experimental because Future is experimental
  • try unstable because the error type might change
  • deschedule/failing unstable

The major thing I did differently than previously-discussed is that I made try experimental: there's been discussion that the error type Box<Any + Send> is not sufficient.

Per https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-07-16.md.

Mark Eq, PartialEq, Ord, PartialOrd as unstable: they will change
slightly after trait reform. Equiv as experimental: better solutions
are desired. min/max stable.
@brson
Copy link
Contributor Author

brson commented Jul 19, 2014

This also adds task::name to replace the deprecated task::with_name and calls it stable.

Weak pointers experimental. Most everything else stable.
Most stable. deschedule/failing experimental because of concerns about
naming and desirability.

Adds task::name() to replace deprecated task::with_name().
@@ -355,7 +365,20 @@ pub fn with_task_name<U>(blk: |Option<&str>| -> U) -> U {
}
}

/// Read the name of the current task.
#[stable]
pub fn name() -> Option<String> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no goal to remove this allocation? (Particularly because the name is often/sometimes a &'static str?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inspecting the name is often a debugging utility, not done in performance critical contexts, so I don't think there's really any benefit in avoiding an allocation.

The only part that may be performance sensitive (not measured) would be spawning a task with a specific name and whether to special-case the &'static str case, but the actual inspection of the name seems much rarer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a logging library would include the task name in logged messages and thus being as performant as possible might be nice? (But yes, seems rare enough to not matter hugely.)

@huonw
Copy link
Member

huonw commented Jul 19, 2014

(Sorry for questioning things that have already been discussed!)

bors added a commit that referenced this pull request Jul 20, 2014
Summary:

* alloc::rc module stable
* Rc type stable
* Functions relating to weak references experimental
* core::cmp module stable
* PartialEq/Eq/PartialOrd/Ord unstable because trait reform will make them change again
* Equiv experimental because there may be better sol'ns
* lexical_ordering deprecated because it can be done trivially with the Ord trait
* min/max stable
* std::task module stable
* TaskBuilder::stdout/stderr experimental because we aren't certain we want to configure the environment this way
* try_future experimental because Future is experimental
* try unstable because the error type might change
* deschedule/failing unstable

The major thing I did differently than previously-discussed is that I made `try` experimental: there's been discussion that the error type `Box<Any + Send>` is not sufficient.


Per https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-07-16.md.
@bors bors closed this Jul 20, 2014
@bors bors merged commit 0b946f0 into rust-lang:master Jul 20, 2014
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.

None yet

6 participants