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

use threading.Lock instead of mp.Lock #1972

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

Conversation

technillogue
Copy link
Contributor

@technillogue technillogue commented Sep 25, 2024

#1802 mentions

although the lock isn't actually shared between processes and the more lightweight threading.Lock could be used, that means it has to be created in run() rather than init

The use of multiprocessing.Lock was introduced in #1773. We suspected that this might have been interfering with other libraries that might use multiprocessing. The specific comfy error turned out to be caused by something else, but it's still unnecessary to have a multiprocess lock.

…s should reduce overhead and avoid potential multiprocessing-related problems if user code also uses multiprocessing
@philandstuff
Copy link
Contributor

can you give a description of what problem you are trying to solve and why this PR solves it?

@technillogue
Copy link
Contributor Author

I've added a description of what problem you are trying to solve and why this PR solves it

@technillogue technillogue requested a review from a team November 4, 2024 20:02
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.

2 participants