awslabs / amazon-kinesis-video-streams-pic

Apache License 2.0
49 stars 47 forks source link

Modify threadpool teardown #218

Closed jdelapla closed 11 months ago

jdelapla commented 12 months ago

Threadpool teardown has been changed so that the threads owned by the threadpool will not need to unlock the ThreadData mutex on teardown. This was accomplished by using the terminate atomic bool in place of the locked mutex to indicate that the threadpool has been destroyed.

codecov-commenter commented 12 months ago

Codecov Report

Patch coverage: 65.38% and project coverage change: -0.01% :warning:

Comparison is base (87f42b6) 75.20% compared to head (9e3ce4c) 75.19%.

:exclamation: Current head 9e3ce4c differs from pull request most recent head e4cabb5. Consider uploading reports for the commit e4cabb5 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #218 +/- ## =========================================== - Coverage 75.20% 75.19% -0.01% =========================================== Files 52 52 Lines 10182 10188 +6 =========================================== + Hits 7657 7661 +4 - Misses 2525 2527 +2 ``` | [Files Changed](https://app.codecov.io/gh/awslabs/amazon-kinesis-video-streams-pic/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs) | Coverage Δ | | |---|---|---| | [src/utils/src/Threadpool.c](https://app.codecov.io/gh/awslabs/amazon-kinesis-video-streams-pic/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs#diff-c3JjL3V0aWxzL3NyYy9UaHJlYWRwb29sLmM=) | `70.50% <65.38%> (-1.48%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/awslabs/amazon-kinesis-video-streams-pic/pull/218/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=awslabs)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jdelapla commented 12 months ago

undefined-behavior-test failed due to race condition within test fixture, no issue with actual module being tested.

ThreadsTest
2023-09-18T22:38:11.3082349Z     #0 0x55b0b1e92271 in SemaphoreFunctionalityTest::acquireThreadRoutine(void*) /home/runner/work/amazon-kinesis-video-streams-pic/amazon-kinesis-video-streams-pic/src/utils/tst/Semaphore.cpp:31:34
2023-09-18T22:38:11.3083523Z     #1 0x7f5de4094b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
2023-09-18T22:38:11.3084738Z     #2 0x7f5de41269ff  (/lib/x86_64-linux-gnu/libc.so.6+0x1269ff) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
2023-09-18T22:38:11.3085225Z 
2023-09-18T22:38:11.3086023Z SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/runner/work/amazon-kinesis-video-streams-pic/amazon-kinesis-video-streams-pic/src/utils/tst/Semaphore.cpp:31:34