Skip to content

Commit

Permalink
readme: fix crossbeam-channel link & example
Browse files Browse the repository at this point in the history
crossbeam-channel is now part of the main crossbeam repository, so link to its
README instead of that of the main repository.

Also, fix the example to accommodate the new crossbeam-channel 0.3
API. See: #29 (comment)
  • Loading branch information
milkey-mouse authored and BurntSushi committed Feb 20, 2019
1 parent c553ff7 commit 65d2496
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## **This crate has reached its end-of-life and is now deprecated.**

The intended successor of the `chan` crate is the
[`crossbeam-channel`](https://github.com/crossbeam-rs/crossbeam-channel)
[`crossbeam-channel`](https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-channel)
crate. Its API is strikingly similar, but comes with a much better `select!`
macro, better performance, a better test suite and an all-around better
implementation.
Expand All @@ -20,7 +20,9 @@ fn notify(signals: &[c_int]) -> Result<channel::Receiver<c_int>> {
let signals = signal_hook::iterator::Signals::new(signals)?;
thread::spawn(move || {
for signal in signals.forever() {
s.send(signal);
if s.send(signal).is_err() {
break;
}
}
});
Ok(r)
Expand Down

0 comments on commit 65d2496

Please sign in to comment.