Wednesday, April 22
Threading Part 2
We learned about thread synchronization issues, such as thread interference and memory consistency problems, and then looked at how solve these problems. We spent our time focused on data integrity solutions - synchronized methods and statements for example - and will look at ensuring the correct run time order of operations in the next class. We wrote code in class to demonstrate thread interference problems and how to synchronize the code so that the problems go away. We also looked at the performance implications of synchronized methods and how we can use synchronized statements (carefully) to improve performance.