-
Notifications
You must be signed in to change notification settings - Fork 301
Add free-threaded python to CI including multithreading test #358
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
base: master
Are you sure you want to change the base?
Conversation
magic/__init__.py
Outdated
# libmagic is not thread-safe: guard for concurrent calls on a global scope | ||
LOCK = threading.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cclauss I realized there is no reason to allow passing a custom lock
17b54b0
to
fe2cb91
Compare
74dfc08
to
79b6d26
Compare
79b6d26
to
5b1d27c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks.
This reverts commit f2ac98d.
simplified the diff here because the global libmagic functions are in fact thread-safe as long as you call them with a different cookie. so having the lock inside the Magic class is in fact correct. |
Awesome! |
Supersedes #357, follow-up on 8a35137