To create a thread, the Windows API supplies the CreateThread( )function. The CreateThread function creates a new thread for a process. Creates a thread that runs in the virtual address space of another process. CreateThread: Creates a thread to execute within the virtual address space of the calling process. You can specify the size of the new thread's stack in bytes using the stackSize parameter which is the 2nd argument of CreateThread( )function in the example below. DisplayMessage(): This function returns nothing. Typically, the starting address is the name of a function defined in the program code (for more information, see ThreadProc ). A POSIX layer such as Cygwin would probably compile an app with #include . The first parameter is a handle to the screen, the second parameter is the name of the thread, the third parameter is the data of the thread, and the last parameter is the iteration number the thread is executing. The native Windows threading API is exposed via #include and it works slightly differently to Linux's threading. The creating thread must specify the starting address of the code that the new thread is to execute. Threads are created in the Windows API using the CreateThread () function, and—just as in Pthreads—a set of attributes like security information, the size of the stack, and a flag for the thread is passed to this function. In the below program, we use the default values for these attributes. This function takes a single parameter and returns a DWORD value. Each thread has its own stack(see thread vs processes). Each process can create multiple isolated pools with different characteristics as necessary. pthread.h is a header for the Unix/Linux (POSIX) API for threads. Each of the following objects is represented by a user-mode data structure: A pool object is a set of worker threads that can be used to perform work. CreateRemoteThreadEx: Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity. The thread pool application programming interface (API) uses an object-based design. This function accepts four parameters.