mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
make "fountain" test optionally terminate
any characters typed as an argument after "fountain" will cause it to terminate in 10 iterations
This commit is contained in:
parent
b470588285
commit
6f1597b1e7
1 changed files with 5 additions and 3 deletions
|
|
@ -139,7 +139,6 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
|||
let bi = boot_instant.clone();
|
||||
move || {
|
||||
handle_connection(stream, bi);
|
||||
log::info!("connection closed");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -150,7 +149,10 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
|||
write!(ret, "TCP listener started on port 80").unwrap();
|
||||
}
|
||||
"fountain" => {
|
||||
// anything typed after fountain will cause this to be a short test
|
||||
let short_test = tokens.next().is_some();
|
||||
thread::spawn({
|
||||
let short_test = short_test.clone();
|
||||
move || {
|
||||
let tp = threadpool::ThreadPool::new(4);
|
||||
loop {
|
||||
|
|
@ -180,7 +182,7 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
|||
_ => {}
|
||||
}
|
||||
count += 1;
|
||||
if count == 10 {
|
||||
if count == 10 && short_test {
|
||||
stream.flush().unwrap();
|
||||
break;
|
||||
}
|
||||
|
|
@ -538,7 +540,7 @@ impl Worker {
|
|||
|
||||
match message {
|
||||
Message::NewJob(job) => {
|
||||
log::info!("Worker {} got a job; executing.", id);
|
||||
log::debug!("Worker {} got a job; executing.", id);
|
||||
|
||||
job();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue