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

Can you run ExifToolHelpers in multiple threads? #102

Open
kwilinsi opened this issue Dec 3, 2024 · 0 comments
Open

Can you run ExifToolHelpers in multiple threads? #102

kwilinsi opened this issue Dec 3, 2024 · 0 comments

Comments

@kwilinsi
Copy link

kwilinsi commented Dec 3, 2024

I have a script that processes thousands of images with multiple worker threads. Each worker does a few things, including extract metadata with PyExifTool.

It's convenient for each worker/thread to create its own exiftool.ExifToolHelper instance. Is this safe?

It seems to work most of the time, but every once in a while I think the program is hanging on ExifToolHelper.run() (it's inconsistent and difficult to test exactly). I'm suspicious that multithreading may be the problem.

If this isn't supported, then I'll need to share one ExifToolHelper between threads (not processes). Is it thread safe, or is a lock necessary?

@kwilinsi kwilinsi changed the title Can you running ExifToolHelper in multiple threads? Can you run ExifToolHelpers in multiple threads? Dec 3, 2024
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

No branches or pull requests

1 participant