Skip to content

Commit

Permalink
attach thread pool for legacy runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed Nov 4, 2024
1 parent cd0e76f commit 234f521
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions monolake/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ fn main() -> Result<()> {
monolake_core::config::RuntimeType::Legacy => {
monoio::RuntimeBuilder::<monoio::LegacyDriver>::new()
.enable_timer()
// Since we read file, we need a thread pool to avoid blocking the runtime
.attach_thread_pool(Box::new(monoio::blocking::DefaultThreadPool::new(4)))
.build()
.expect("Failed building the Runtime with LegacyDriver")
.block_on(run(runtime_config, &args.config));
Expand Down

0 comments on commit 234f521

Please sign in to comment.