Skip to content

Commit

Permalink
multicore: Documentation tweaks
Browse files Browse the repository at this point in the history
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
str4d and daira committed Jun 1, 2021
1 parent 5c6e42d commit e674d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -9,7 +9,8 @@ and this project adheres to Rust's notion of
### Added
- `BELLMAN_NUM_CPUS` environment variable, which can be used to control the
number of logical CPUs that `bellman` will use when the (default) `multicore`
feature flag is enabled.
feature flag is enabled. The default (which has not changed) is to use the
`num_cpus` crate to determine the number of logical CPUs.
- `bellman::multicore::Waiter`

### Changed
Expand Down
6 changes: 3 additions & 3 deletions src/multicore.rs
Expand Up @@ -114,7 +114,7 @@ mod implementation {
self.receiver.recv().unwrap()
}

/// One off sending.
/// One-off sending.
pub fn done(val: T) -> Self {
let (sender, receiver) = bounded(1);
sender.send(val).unwrap();
Expand Down Expand Up @@ -185,10 +185,10 @@ mod implementation {
impl<T> Waiter<T> {
/// Wait for the result.
pub fn wait(&mut self) -> T {
self.val.take().unwrap()
self.val.take().expect("unmet data dependency")
}

/// One off sending.
/// One-off sending.
pub fn done(val: T) -> Self {
Waiter { val: Some(val) }
}
Expand Down

0 comments on commit e674d2d

Please sign in to comment.