Summary

That's it for threads! In this chapter, you've learned the basics of how threads work and how to work with them. Now you can make sure your games don't have thread-synchronization problems or cause deadlock. You've also learned that you can't avoid dealing with threads in Java games because all graphical Java apps have at least two threads. Finally, you've created a generic ThreadPool class that can be useful in many situations.