?
Solved

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

Posted on 2008-11-11
5
Medium Priority
?
317 Views
Last Modified: 2013-12-14
"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
Comment
Question by:F-J-K
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:wwnosal
ID: 22933920
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
 
LVL 1

Author Comment

by:F-J-K
ID: 22935168
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
 
LVL 6

Accepted Solution

by:
wwnosal earned 1500 total points
ID: 22940605
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
 
LVL 1

Author Comment

by:F-J-K
ID: 22942861
No don't delete it anymore....Thanks
0
 
LVL 1

Author Closing Comment

by:F-J-K
ID: 31515670
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Make the most of your online learning experience.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Screencast - Getting to Know the Pipeline

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question