In the future articles, we shall discuss more about adding message pump to the thread to make it a User Interface thread, we shall also discuss using Thread synchronization primitives and thread pooling with comprehensive examples. Thread Definition Thread is a single path of execution in a process. Thread is also known as a lightweight process. It requires fewer resources than a process and executes within the address space of a process. There can be several threads running simultaneously within a process.
Every operating system supports threads.
A thread is usually defined by a function, which carries a predefined generic signature. When we create a thread with a function of this kind, then the function runs in a new path of execution. Rest of the parameters to CreateThread function will be ignored for now. Our task is to build an object oriented wrapper class using these functions, since we know they are enough to create a thread. Lets now create a class called ThreadClass.