Skip to content

Updates for python free threading#403

Merged
jcapriot merged 15 commits intosimpeg:mainfrom
jcapriot:TreeMesh_modify_lock
Oct 2, 2025
Merged

Updates for python free threading#403
jcapriot merged 15 commits intosimpeg:mainfrom
jcapriot:TreeMesh_modify_lock

Conversation

@jcapriot
Copy link
Member

The only place free threading should throw us an issue is on modifying the structure of the TreeMesh, as multiple concurrent calls to a refine function will modify a c++ map which is not a thread safe operation. This PR adds a cython mutex lock to the locations that modify the structure of the mesh, and then marks our .pyx extension modules as safe for free threading.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 98.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.81%. Comparing base (267d976) to head (dff9c40).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
tests/cyl/test_cyl_io.py 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #403      +/-   ##
==========================================
+ Coverage   86.65%   86.81%   +0.16%     
==========================================
  Files          91       91              
  Lines       18769    18802      +33     
  Branches     2119     2119              
==========================================
+ Hits        16264    16323      +59     
+ Misses       1820     1801      -19     
+ Partials      685      678       -7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jcapriot jcapriot merged commit 82d40ff into simpeg:main Oct 2, 2025
27 checks passed
@jcapriot jcapriot deleted the TreeMesh_modify_lock branch October 2, 2025 16:44
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.

1 participant