CHAPTER 4

image

Using Threads in Your Applications

If you’re like most users, you probably have more than one application running on your computer most of the time. In addition, you probably sometimes initiate a long-running task in one application and switch to another application while waiting for that task to complete. For example, you might start downloading a file from the Internet, or begin a search that scans your disk drive for files matching a particular pattern, and then read your e-mail while the download or search is in progress. Running multiple applications simultaneously (or at least appearing to do so) is called multitasking, and each ...

Get Pro Java 8 Programming, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.