mirror of
https://github.com/figsoda/mmtc
synced 2025-02-16 21:38:38 +00:00
clean up
This commit is contained in:
parent
67ee03944a
commit
5c17bfd29c
1 changed files with 7 additions and 6 deletions
13
src/main.rs
13
src/main.rs
|
@ -447,13 +447,14 @@ async fn run() -> Result<()> {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let updates = updates.swap(0b000, Ordering::SeqCst);
|
||||
// wait for more commands or updates if neither were received
|
||||
if updates == 0b000 {
|
||||
thread::park();
|
||||
continue;
|
||||
match updates.swap(0b000, Ordering::SeqCst) {
|
||||
// wait for more commands or updates if neither were received
|
||||
x if x == 0b000 => {
|
||||
thread::park();
|
||||
continue;
|
||||
}
|
||||
x => x,
|
||||
}
|
||||
updates
|
||||
};
|
||||
|
||||
// conditionally update status
|
||||
|
|
Loading…
Add table
Reference in a new issue