aws-sdk-cpp
aws-sdk-cpp copied to clipboard
[aws-cpp-sdk-core] keep MonitoringManager alive until shutdown completes
The MonitoringManager can not be shut down via Aws::ShutdownAPI, since there is the possibility of detached threads with completing transfers that still need to call methods of the MonitoringManager.
The MonitoringManager needs to stay alive (not be cleaned up via CleanupMonitoring) as long as there are completing threads. Since it is difficult to time detached threads, it is better to not call CleanupMonitoring at all during shutdown.
Issue #, if available: Resolves #2135
Check all that applies:
- [X] Did a review by yourself.
- [X] Added proper tests to cover this PR. (If tests are not applicable, explain.) Tested with program that reproduced MonitoringManager crash at shutdown that problem no longer occurs.
- [X] Checked if this PR is a breaking (APIs have been changed) change.
- [X] Checked if this PR will not introduce cross-platform inconsistent behavior.
- [X] Checked if this PR would require a ReadMe/Wiki update.
Check which platforms you have built SDK on to verify the correctness of this PR.
- [X] Linux
- [ ] Windows
- [ ] Android
- [ ] MacOS
- [ ] IOS
- [ ] Other Platforms
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.