Language Elements

Object Oriented Concepts

Data Types

Key Words

Arrays

Pointers

Data Structures

Multithreading

Errors and Exception Handling

Interview Questions



Contact



Multithreading in C++


Multithreading is ability of an operating system to execute different threads simultaneously, without interfering with each other. A thread refers to an independent path of execution. In mulithread application, there is more than one thread (or function) of execution running in parallel with the main () function. Multithreading makes programming more efficient, best using the available CPU resources. Though C++ does not feature built-in support for multithreading, it can be used to create multithreaded programs, which relies on the operating system used.Windows platform supports multithreading.

A process is an executing program, with thread, an executing part within it. All processes have at least one thread of execution, i.e. main thread, which is created at the begining of the program. In a multithreaded program, the main thread creates one or more child threads. Threads within a process share the same address space, and are interdependant, so can easily communicate with each other (considered good for programmng), as well can interfere with each other (need to be avoided).























Copyright © by Zafar Yasin. All rights reserved.