Skip to content

Can you run ExifToolHelpers in multiple threads? #102

@kwilinsi

Description

@kwilinsi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions