Skip to content

Commit

Permalink
Merge pull request #202 from bfffs/current-thread
Browse files Browse the repository at this point in the history
Only use one thread with Tokio
  • Loading branch information
asomers committed Jun 4, 2022
2 parents c1dd649 + 1f604e7 commit 4a2f106
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bfffs-fio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub extern "C" fn rust_ctor() {

lazy_static! {
static ref RUNTIME: RwLock<Runtime> = RwLock::new(
Builder::new_multi_thread()
Builder::new_current_thread()
.enable_time()
.enable_io()
.build()
Expand Down
2 changes: 1 addition & 1 deletion bfffs/benches/fs_destroy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fn fs_destroy(
Ok(())
}

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
tracing_subscriber::fmt()
.pretty()
Expand Down
2 changes: 1 addition & 1 deletion bfffs/src/bin/bfffsd/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ impl Bfffsd {
}
}

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() {
tracing_subscriber::fmt()
.pretty()
Expand Down

0 comments on commit 4a2f106

Please sign in to comment.