background preloader

Concurrency

Facebook Twitter

Lesson: Concurrency (The Java™ Tutorials > Essential Classes) Computer users take it for granted that their systems can do more than one thing at a time.

Lesson: Concurrency (The Java™ Tutorials > Essential Classes)

They assume that they can continue to work in a word processor, while other applications download files, manage the print queue, and stream audio. Even a single application is often expected to do more than one thing at a time. For example, that streaming audio application must simultaneously read the digital audio off the network, decompress it, manage playback, and update its display. Java Concurrency in Practice. Java Concurrency Tutorial. Back in the old days a computer had a single CPU, and was only capable of executing a single program at a time.

Java Concurrency Tutorial

Later came multitasking which meant that computers could execute multiple programs (AKA tasks or processes) at the same time. It wasn't really "at the same time" though. The single CPU was shared between the programs. The operating system would switch between the programs running, executing each of them for a little while before switching.