We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a5381 commit 5c78bc0Copy full SHA for 5c78bc0
crates/completest-pty/src/lib.rs
@@ -480,16 +480,7 @@ fn comptest(
480
// since we don't know when exactly shell is done completing the idea is to wait until
481
// something at all is produced, then wait for some duration since the last produced chunk.
482
rcv.recv().unwrap();
483
- loop {
484
- std::thread::sleep(timeout);
485
- let mut cnt = 0;
486
- while rcv.try_recv().is_ok() {
487
- cnt += 1;
488
- }
489
- if cnt == 0 {
490
- break;
491
492
+ while rcv.recv_timeout(timeout).is_ok() {}
493
shutdown_ref.store(true, std::sync::atomic::Ordering::SeqCst);
494
process.exit(false).unwrap();
495
});
0 commit comments