Concurrency and Parallelization limitations
masterThe underlying native PDFium library is not thread-safe. Consequently, all calls into PDFium are protected with locks within this library.
Key constraints:
- You can only process one PDF at a time within a single process.
- True parallel processing cannot be achieved via multi-threading in a single process.
Workaround for parallel processing: If you require parallel execution, you must spawn multiple separate processes and distribute the workload across them, using inter-process communication (IPC) and serialization to collect results.