Skip to content

Commit

Permalink
fix "os can't spawn worker thread"
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Aug 14, 2024
1 parent 65d3762 commit 55191f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions native/core/src/execution/jni_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ pub unsafe extern "system" fn Java_org_apache_comet_Native_createPlan(

// Use multi-threaded tokio runtime to prevent blocking spawned tasks if any
let runtime = tokio::runtime::Builder::new_multi_thread()
.worker_threads(4)
.max_blocking_threads(10)
.enable_all()
.build()?;

Expand Down

0 comments on commit 55191f7

Please sign in to comment.