Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable locks for threadsafe pdfium #1052

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dolfim-ibm
Copy link
Contributor

This PR attempts to make the usage of Docling threadsafe, e.g. when running asynchronous jobs. See https://pypdfium2.readthedocs.io/en/v4/python_api.html#thread-incompatibility.

This is inspired by the langchain implementation, see https://python.langchain.com/api_reference/_modules/langchain_community/document_loaders/parsers/pdf.html.

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
@dolfim-ibm dolfim-ibm requested a review from cau-git February 25, 2025 10:19
Copy link

mergify bot commented Feb 25, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm
Copy link
Contributor Author

CI cancelled. It seems to have a deadlock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant