Summary
In this chapter, we learned about how to sanitize and test asynchronous programs.
We started by learning how to sanitize code using sanitizers to help find multithreaded and asynchronous issues, such as race conditions, memory leaks, and use-after-scope errors, among many other issues.
Then, some testing techniques designed to deal with asynchronous software were described, using GoogleTest as the testing library.
Using these tools and techniques helps detect and prevent undefined behavior, memory errors, and security vulnerabilities while ensuring that concurrent operations execute correctly, timing issues are handled properly, and code performs as expected under various conditions. This improves the overall program’s reliability and stability.
In the next chapter, we will learn about performance and optimization techniques that can be used to improve asynchronous programs’ runtime and resource usage.