Skip to content

fix(sync): Destroy condition variables - #2004

Open
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/fix/condvar-free
Open

fix(sync): Destroy condition variables#2004
jpnurmi wants to merge 3 commits into
masterfrom
jpnurmi/fix/condvar-free

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Add cross-platform condition-variable cleanup and invoke it when thread pools, background workers, flush tasks, and app-hang monitors are released.

Condition variables may own implementation-specific resources, and POSIX requires destroying an initialized condition variable before reinitializing it. Close the semaphore and event handles owned by the pre-Vista emulation.

Update synchronization tests to clean up their condition variables. Keep the task-queue notification under its predicate mutex so teardown cannot race with an in-flight signal.

Add cross-platform condition-variable cleanup and invoke it when thread
pools, background workers, flush tasks, and app-hang monitors are released.

Condition variables may own implementation-specific resources, and POSIX
requires destroying an initialized condition variable before reinitializing it.
Close the semaphore and event handles owned by the pre-Vista emulation.

Update synchronization tests to clean up their condition variables. Keep the
task-queue notification under its predicate mutex so teardown cannot race with
an in-flight signal.
Comment thread tests/unit/test_sync.c
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.42%. Comparing base (85b229c) to head (17fce54).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2004      +/-   ##
==========================================
+ Coverage   74.41%   74.42%   +0.01%     
==========================================
  Files         104      104              
  Lines       25913    25922       +9     
  Branches     4691     4691              
==========================================
+ Hits        19282    19293      +11     
+ Misses       5299     5298       -1     
+ Partials     1332     1331       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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