Skip to content

Commit

Permalink
Merge pull request #38 from dns2utf8/patch-1
Browse files Browse the repository at this point in the history
Enable `#[deprecated]` doc, requires rust 1.9
  • Loading branch information
frewsxcv committed Aug 20, 2016
2 parents 30870c7 + d93de4e commit 3191674
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
sudo: false
language: rust
cache: cargo
rust:
- 1.4.0
- 1.9.0
- beta
- nightly
before_script:
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## 1.3.2

* [Enable `#[deprecated]` doc, requires rust 1.9](https://github.com/frewsxcv/rust-threadpool/pull/38)

## 1.3.1

* [Implement std::fmt::Debug for ThreadPool](https://github.com/frewsxcv/rust-threadpool/pull/50)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
threadpool
==========
# threadpool

A thread pool for running a number of jobs on a fixed set of worker threads.

Expand All @@ -22,6 +21,10 @@ and this to your crate root:
extern crate threadpool;
```

## Minimal requirements

This crate requires rust >= 1.9.0

## Similar libraries

* [rust-scoped-pool](http://github.com/reem/rust-scoped-pool)
Expand Down
6 changes: 3 additions & 3 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ impl ThreadPool {
}

/// **Deprecated: Use `ThreadPool::set_num_threads`**
// #[deprecated(since = "1.3.0", note = "use ThreadPool::set_num_threads")]
// TODO: #[deprecated] isn't stable yet.
#[deprecated(since = "1.3.0", note = "use ThreadPool::set_num_threads")]
pub fn set_threads(&mut self, num_threads: usize) {
self.set_num_threads(num_threads)
}
Expand Down Expand Up @@ -548,7 +547,8 @@ mod test {
assert_eq!(rx.iter().take(test_tasks).fold(0, |a, b| a + b), test_tasks);
// `iter().take(test_tasks).fold` may be faster than the last thread finishing itself, so
// values of 0 or 1 are ok.
assert!(pool.active_count() <= 1);
let atomic_active_count = pool.active_count();
assert!(atomic_active_count <= 1, "atomic_active_count: {}", atomic_active_count);
}

#[test]
Expand Down

0 comments on commit 3191674

Please sign in to comment.