What Is Multithreading?

Before looking at why we would create a multithreaded application, let me first define what multithreading is. A conventional definition of multithreading is the ability of an operating system to execute different parts of a program, called threads, simultaneously. This may sound similar to multitasking so it's important to make clear the distinction. Multitasking is the ability of an operating system to execute more than one program at a time. Each program has its own memory space, with its own stack, heap, and set of variables. An example of this is when you have your Web browser open and then launch a word processing program. Multithreading, on the other hand, is the ability of the operating system to execute different ...

Get PowerBuilder® 9: Internet and Distributed Application Development 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.