Skip to content

doc: nits and fixes for thread API #22689

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

Merged
merged 2 commits into from
Mar 2, 2015
Merged

doc: nits and fixes for thread API #22689

merged 2 commits into from
Mar 2, 2015

Conversation

tshepang
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

//!
//! ## The `Thread` type
//!
//! Already-running threads are represented via the `Thread` type, which you can
//! Threads are represented via the `Thread` type, which you can
Copy link
Member

Choose a reason for hiding this comment

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

Thread still only represents already-running threads.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed Already-running because it doesn't work well with the line that follows it:

By spawning a new thread, e.g. using the thread::spawn function.

//! panic may optionally be detected from a different thread. If
//! the main thread panics the application will exit with a non-zero
//! the panic may optionally be detected from a different thread. If
//! the main thread panics, the application will exit with a non-zero
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this comma is necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

If the comma is removed, the sentence will have to be slightly re-organised by starting with "The application...". Otherwise, the pause feels very needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@alexcrichton The comma usage here is correct. See https://owl.english.purdue.edu/owl/resource/607/02/ item 2.

Copy link
Member

Choose a reason for hiding this comment

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

Some people leave it in, some leave it out. I generally put it in. It's fine either way.

@alexcrichton
Copy link
Member

r? @steveklabnik

I may not be the best wordsmith

@steveklabnik
Copy link
Member

@bors: r+ fa4cb49 rollup

@tshepang
Copy link
Member Author

tshepang commented Mar 2, 2015

wow, that felt long; thanks @steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 2, 2015
@bors bors merged commit fa4cb49 into rust-lang:master Mar 2, 2015
@tshepang tshepang deleted the thread-doc-improvements branch March 3, 2015 00:04
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.

7 participants