One of the biggest challenges with concurrency is that bugs are often found late in the development process. Often, a concurrency error will first be seen in a production environment, when Murphy's law becomes a reality and all the things that can go wrong actually do go wrong.
This is because many of the bugs related to concurrency will happen during edge cases that either are thought of as impossible, or are so unlikely that they didn't even cross the minds of the developer or the code reviewers. This chapter aims to provide you with some advice on how to write tests that can help you to identify the scenarios you aren't prepared to handle, as well as some information on how to successfully write logs and debug your coroutines.
The topics in this chapter are interleaved with general advice that may not be directly related...