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 ServiceTracker race #558

Merged
merged 4 commits into from May 6, 2021
Merged

Conversation

jeffdiclemente
Copy link
Member

The race occurs when a customizer is still running and the ServiceTracker object is in the process of being destroyed.

The fix is to have ServiceTracker::Close unregister its service listener and then wait for any existing service events to finish processing before cleaning up and calling untrack.

Signed-off-by: The MathWorks, Inc. jdicleme@mathworks.com

The race occurs when a customizer is still running and the ServiceTracker object is in the process of being destroyed.

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
@codecov-commenter
Copy link

codecov-commenter commented May 4, 2021

Codecov Report

Merging #558 (6338684) into development (0a3d4f7) will increase coverage by 0.40%.
The diff coverage is 85.52%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #558      +/-   ##
===============================================
+ Coverage        89.79%   90.20%   +0.40%     
===============================================
  Files              234      234              
  Lines             9480     9606     +126     
===============================================
+ Hits              8513     8665     +152     
+ Misses             967      941      -26     
Impacted Files Coverage Δ
...eclarativeServices/src/manager/ConcurrencyUtil.hpp 90.00% <ø> (-6.30%) ⬇️
...ativeServices/src/manager/states/CCActiveState.hpp 66.66% <ø> (ø)
...de/cppmicroservices/detail/BundleAbstractTracked.h 100.00% <ø> (ø)
...ework/include/cppmicroservices/detail/ScopeGuard.h 100.00% <ø> (ø)
.../cppmicroservices/detail/BundleAbstractTracked.tpp 82.19% <64.28%> (+8.21%) ⬆️
...ork/include/cppmicroservices/detail/CounterLatch.h 86.95% <86.95%> (ø)
...include/cppmicroservices/detail/TrackedService.tpp 75.80% <86.95%> (+9.84%) ⬆️
...ompendium/DeclarativeServices/src/SCRActivator.cpp 84.09% <100.00%> (+2.03%) ⬆️
...ativeServices/src/manager/states/CCActiveState.cpp 68.57% <100.00%> (-2.49%) ⬇️
...include/cppmicroservices/detail/ServiceTracker.tpp 80.59% <100.00%> (+8.62%) ⬆️
... and 28 more

Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
@jeffdiclemente jeffdiclemente merged commit 6337ceb into development May 6, 2021
@jeffdiclemente jeffdiclemente deleted the fix-servicetracker-race branch May 6, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants