Producer-Consumer System/Context
Jump to navigation
Jump to search
To write concurrent programs is hard. To a large extend, this difficulty comes from a lack of good testing and debugging strategies. We also make mistakes when we write sequential programs, but we are better equipped to detect and correct them.
What makes dealing with concurrent systems more difficult is their inherent nondeterminism: the same program, on the same input, can behave differently from run to run. This results in bugs that occur extremely rarely and are not reproducible. Such bugs can be real nightmares: There is something wrong with your system, you know it, you have seen it, but until you can make it happen again, you don’t know how to approach the problem.