• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

What is Primary Thread? C/C++on Windows

"Each process is started with a single thread, often called the primary thread, but can create additional threads from any of its threads."

Is primary thread here refers to the application itself without having it run anything?
For example, a program executes which creates a process (application itself), Is it a the same time called primary thread?

Or primary thread is the first activity that happens on the process?

I hope my question is clear
0
F-J-K
Asked:
F-J-K
  • 3
  • 2
1 Solution
 
wwnosalCommented:
How I understand this is the following:
1. If your application is single threaded its only thread is primary thread.
2. If your application is multithreading then the first thread that had started (application itself normally ) is a primary thread no matter how many "child" threads are started.
That is how I understood it..
0
 
F-J-KAuthor Commented:
I do not get this: If your application is multithreading then the first thread that had started (application itself normally ) is a primary thread no matter how many "child" threads are started.

>> (application itself normally ) is a primary thread no matter how many "child" threads are started.

I do not get this part. Can you re-explain please?

Thanks
0
 
wwnosalCommented:
The point is that threads are not started by itself.. Only the application (precisely speaking a piece of software containing main function) can be started by the OS. Other threads usually are started by the parent thread (primary thread)  as a dependent processes.
0
 
F-J-KAuthor Commented:
No don't delete it anymore....Thanks
0
 
F-J-KAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now