just remove bad code from tokryon
Cargo Check, Format, Fix and Test / cargo CI (push) Failing after 1m25s
Details
Cargo Check, Format, Fix and Test / cargo CI (push) Failing after 1m25s
Details
This commit is contained in:
parent
e86f3b0b6f
commit
3456c2d0da
|
@ -33,19 +33,6 @@ async fn main() {
|
||||||
println!("starting the threads");
|
println!("starting the threads");
|
||||||
let mut interval = interval(tokio::time::Duration::from_millis(100));
|
let mut interval = interval(tokio::time::Duration::from_millis(100));
|
||||||
loop {
|
loop {
|
||||||
match future::select(do_work(), interval.tick()).await {
|
|
||||||
Either::Left((result, _)) => {
|
|
||||||
// Our worker completed successfully!
|
|
||||||
result?;
|
|
||||||
|
|
||||||
// Do any additional processing here after successful completion
|
|
||||||
},
|
|
||||||
|
|
||||||
Either::Right(_) => {
|
|
||||||
// The interval has fired - we don't have to wait for the worker anymore
|
|
||||||
println!("Interval triggered!");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = interval.tick() => {
|
_ = interval.tick() => {
|
||||||
println!("The number: {THE_NUMBER:?}");
|
println!("The number: {THE_NUMBER:?}");
|
||||||
|
|
Loading…
Reference in New Issue