just remove bad code from tokryon
Cargo Check, Format, Fix and Test / cargo CI (push) Failing after 1m25s Details

This commit is contained in:
Christoph J. Scherr 2024-02-01 10:41:24 +01:00
parent e86f3b0b6f
commit 3456c2d0da
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 0 additions and 13 deletions

View File

@ -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:?}");