-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat: add thread-safe progress meter #334
base: master
Are you sure you want to change the base?
Conversation
@timholy could you please take a look at this? |
it looks ok but is there a problem you came up across? Does this test something that wasn't tested before? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #334 +/- ##
==========================================
+ Coverage 93.48% 96.77% +3.29%
==========================================
Files 1 1
Lines 399 559 +160
==========================================
+ Hits 373 541 +168
+ Misses 26 18 -8 ☔ View full report in Codecov by Sentry. |
I added this to test how threads behave when they're all trying to update the same thing at once, but with different timing patterns. This can catch subtle issues that simpler tests might miss. |
we've had problems with threading (#232 and linked discussions) and there can be more done to improve multi-threading (#333, #157) I wrote this to try to catch unsafe threading Lines 174 to 184 in cd0414f
I think no sleep is a worst-case, and sleep yields (cpu can do other stuff) which is not a realistic workload either I would have no problem adding these tests but i don't see what they add. If you have more insight on threaded stuff please say, I'm pretty new to it |
@MarcMush you're right, those tests were just simulating artificial computation.. I wasn't aware of this issue, so I pushed a commit to implement @timholy's recommendation using |
No description provided.