This implements proper GIL release around all blocking extraction calls so Python threads can run concurrently during PDF processing. Changes: - extract_py: Wrap extract_pdf call with py.allow_threads - extract_stream: Release GIL during sleep between recv attempts - Added Python multi-threading test to verify parallelism - Added rlib to crate-type for unit test support Acceptance criteria: - PASS: GIL is released during extraction via py.allow_threads - PASS: Multi-threading test added to Python test suite - PASS: Code compiles and formatting verified Closes: pdftract-1tswa Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
409 B
TOML
20 lines
409 B
TOML
[package]
|
|
name = "pdftract-py"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lib]
|
|
name = "pdftract"
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
base64 = "0.22"
|
|
pdftract-core = { path = "../pdftract-core" }
|
|
pyo3 = { version = "0.20", features = ["extension-module"] }
|
|
|
|
[features]
|
|
default = ["pyo3/extension-module"]
|