I need to know which are the APIs/library used for multithreading by MSVC . If there are more than one , please let me know which is the most widely used.
If my question sounds too naive , its because I’ve never done threading before , and from my past experience , I know there are people here who can get me started/point me at the right direction , from which point I can start.
As others have suggested you can use CreateThread or _beginthread or the threadpool APIs, the process and threads reference is best for Win32 threading, you can also use boost::thread which is very close to the C++0x std::thread standard.
The other option if you’re using Visual Studio is to take a look at the Parallel Pattern Library and Asynchronous Agents Library which are part of Microsoft’s Concurrency Runtime (ConcRT) and are new in Visual Studio 2010. There are several how-to help topics which in the link that can help you get started here.
The API’s in ConcRT are ‘task’ APIs rather than thread APIs and let you work at a slightly higher level of abstraction than threads. i.e. parallel loops, parallel pipelines and groups of tasks. Like boost::thread, the APIs are primarily setup to work with functors rather than the CreateThread / ThreadPool style APIs though there are APIs which are similar syntactically to CreateThread (Concurrency::Scheduler::ScheduleTask for example).
-Rick