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

Document `.clone()` #79

Merged
merged 4 commits into from Aug 10, 2017

Conversation

Projects
None yet
2 participants
@dns2utf8
Copy link
Member

dns2utf8 commented Aug 5, 2017

The example became rather long but it is the shortest one I could come up with with one pool.
I am open to suggestions.

lib.rs Outdated
/// We could for example [`join`](#method.join) a pool from multiple
/// threads or submit jobs from multiple threads concurrently.
///
/// ```

This comment has been minimized.

@frewsxcv

frewsxcv Aug 8, 2017

Collaborator

Sorry for the delay, I'm thinking if there's a simpler example we can put here. I know you're spawning threads so you can show that the ThreadPool can be cloned, but do we need much of the other code here?

This comment has been minimized.

@dns2utf8

dns2utf8 Aug 8, 2017

Author Member

No worries 😄
I could shorten the code by half by using a loop to spawn the threads and then use another loop/fold to join them. Or would you go into a completely different direction?

@dns2utf8 dns2utf8 force-pushed the dns2utf8:doc_clone branch from ce1ea68 to f7d7975 Aug 9, 2017

@dns2utf8

This comment has been minimized.

Copy link
Member Author

dns2utf8 commented Aug 9, 2017

I shortened the example. Reduced the example to submitting jobs from multiple threads.

@frewsxcv

This comment has been minimized.

Copy link
Collaborator

frewsxcv commented Aug 10, 2017

thanks!

bors r+

bors bot added a commit that referenced this pull request Aug 10, 2017

Merge #79
79: Document `.clone()` r=frewsxcv

The example became rather long but it is the shortest one I could come up with with one pool.
I am open to suggestions.
@bors

This comment has been minimized.

Copy link
Contributor

bors bot commented Aug 10, 2017

@bors bors bot merged commit d8d3186 into rust-threadpool:master Aug 10, 2017

2 of 4 checks passed

continuous-integration/travis-ci/push The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
bors Build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dns2utf8 dns2utf8 deleted the dns2utf8:doc_clone branch Aug 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.