Use meaningful names for select! variables
This commit is contained in:
parent
e8e6d292c5
commit
a417c7c8c7
|
@ -353,8 +353,10 @@ where
|
||||||
);
|
);
|
||||||
|
|
||||||
let crawler_action = tokio::select! {
|
let crawler_action = tokio::select! {
|
||||||
a = handshakes.next() => a.expect("handshakes never terminates, because it contains a future that never resolves"),
|
next_handshake_res = handshakes.next() => next_handshake_res.expect(
|
||||||
a = crawl_timer.next() => a.expect("timers never terminate"),
|
"handshakes never terminates, because it contains a future that never resolves"
|
||||||
|
),
|
||||||
|
next_timer = crawl_timer.next() => next_timer.expect("timers never terminate"),
|
||||||
// turn the demand into an action, based on the crawler's current state
|
// turn the demand into an action, based on the crawler's current state
|
||||||
_ = demand_rx.next() => {
|
_ = demand_rx.next() => {
|
||||||
if handshakes.len() > 50 {
|
if handshakes.len() > 50 {
|
||||||
|
|
|
@ -73,9 +73,9 @@ mod imp {
|
||||||
// If both signals are received, select! chooses one of them at random.
|
// If both signals are received, select! chooses one of them at random.
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
// SIGINT - Terminal interrupt signal. Typically generated by shells in response to Ctrl-C.
|
// SIGINT - Terminal interrupt signal. Typically generated by shells in response to Ctrl-C.
|
||||||
() = sig(SignalKind::interrupt(), "SIGINT") => {}
|
_ = sig(SignalKind::interrupt(), "SIGINT") => {}
|
||||||
// SIGTERM - Standard shutdown signal used by process launchers.
|
// SIGTERM - Standard shutdown signal used by process launchers.
|
||||||
() = sig(SignalKind::terminate(), "SIGTERM") => {}
|
_ = sig(SignalKind::terminate(), "SIGTERM") => {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue