Skip to content

added a fat lock around numexpr.evaluate #200

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

Merged
merged 1 commit into from
Jan 26, 2016

Conversation

jennolsen84
Copy link
Contributor

fixes #80

@FrancescAlted
Copy link
Contributor

Hmm, with this fat lock maybe there is no need for #199 . Can you confirm please? It would be a good idea to put the lock as high as possible and then remove the ones that are not needed.

@jennolsen84
Copy link
Contributor Author

Perhaps, but the extra locks aren't that bad in this case. Lock contention hurts, but here we'll be avoiding lock contention. Locks also prevent some minor optimizations from happening by the C compiler (e.g. caching a variable in a register) across memory barriers (which a lock will insert), but that hit is so minor at this point, it is not worth mentioning.

Please accept this PR, as things are better with it than without.

@FrancescAlted
Copy link
Contributor

Ok. So merging.

FrancescAlted added a commit that referenced this pull request Jan 26, 2016
added a fat lock around numexpr.evaluate
@FrancescAlted FrancescAlted merged commit 6d19a1b into pydata:master Jan 26, 2016
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.

numexpr is not thread-safe
2 participants