Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix(concurrency): allow threads in pyo3 (realse the GIL) (#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
noaov1 authored Jun 13, 2024
1 parent c93ac90 commit 3ff794c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/native_blockifier/src/py_block_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ impl PyBlockExecutor {
.unzip();

// Run.
let results = self.tx_executor().execute_txs(&txs);
let results =
Python::with_gil(|py| py.allow_threads(|| self.tx_executor().execute_txs(&txs)));

// Process results.
// TODO(Yoni, 15/5/2024): serialize concurrently.
Expand Down

0 comments on commit 3ff794c

Please sign in to comment.