The Secrets of Concurrency

From the first version of Java, we have been able to create multiple threads. Initially, this was mostly used for making our GUIs more responsive. For example, we would read a file using a separate thread from the main Swing thread, updating the GUI as to the progress. Running many active threads on one CPU seldom made the program faster, on the contrary, the swapping overhead frequently bogged down the machine.

However, in the last few years, the speed increase of CPUs has not been the clock speed, but the number of cores on each chip. We are in a position now where we can get a job done much faster by splitting it between multiple threads.

Unfortunately there is still a lack of understanding of the mysteries surrounding threading. This has caused programmers to write code that is fundamentally incorrect, not taking into account best practices for threading.


About Heinz Kabutz

Heinz is the mastermind behind The Java Specialists' Newsletter. He has a PhD in Computer Science. Heinz has programmed significant portions of several large Java applications and has taught Java to thousands of professional programmers. He is a regular speaker at all the major Java conferences. Heinz was chosen as a Java Champion by Sun Microsystems, the inventors of Java, for his work in advancing Java. Heinz presents our Java training courses anywhere in the world, either in person or via remote teaching technologies. He is the author of all our courses, including Java Specialist Master, Design Patterns and Concurrency Specialist Courses.

More About Heinz »