Skip to content

Commit

Permalink
wip: sketch spawning processes
Browse files Browse the repository at this point in the history
  • Loading branch information
cablehead committed Jun 7, 2024
1 parent 992c611 commit 9e39dd8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::path::PathBuf;
use std::time::Duration;

use clap::Parser;

Expand Down Expand Up @@ -30,8 +31,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
{
let store = store.clone();
tokio::spawn(async move {
let res = xs::spawn::spawn(store).await;
eprintln!("peace from spawn: {:?}", res);
loop {
let store = store.clone();
eprintln!("spawning up");
let res = xs::spawn::spawn(store).await;
eprintln!("peace from spawn: {:?}", res);
tokio::time::sleep(Duration::from_millis(1000)).await;
}
});
}

Expand Down

0 comments on commit 9e39dd8

Please sign in to comment.