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

fix(concurrency): allow threads in pyo3 (release the GIL) #1978

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading