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

Fix thread sanitizer leak when launching Python 3.13 and using from neuron import h, gui. #3243

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nrnhines
Copy link
Member

No description provided.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 67.08%. Comparing base (c199d9f) to head (be19ebe).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
share/lib/python/neuron/gui.py 56.25% 7 Missing ⚠️
src/nrnpython/inithoc.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3243      +/-   ##
==========================================
- Coverage   67.08%   67.08%   -0.01%     
==========================================
  Files         569      569              
  Lines      111079   111091      +12     
==========================================
+ Hits        74520    74525       +5     
- Misses      36559    36566       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@nrnhines nrnhines marked this pull request as draft November 22, 2024 13:42
Copy link

✔️ be19ebe -> Azure artifacts URL

Copy link
Contributor

@JCGoran JCGoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, and it seems to fix the thread leak issue, I have only minor comments.

Comment on lines -30 to -35
This allows one to temporarily disable the process_events loop using a construct
like:
from neuron import gui
with gui.disabled():
something_that_would_interact_badly_with_process_events()
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is still current, but if so, it should either stay here, or be moved to the docstring of disabled below. If it's not current, just ignore this comment.

@@ -208,11 +208,20 @@ static int have_opt(const char* arg) {
}

void nrnpython_finalize() {
printf("nrnpython_finalize()\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put behind an #ifndef NDEBUG, or a comment?

Copy link

sonarcloud bot commented Nov 26, 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

Successfully merging this pull request may close these issues.

3 participants