Suppose I have this big_task()
function that I can split between threads for speedup.
The way to solve that issue with multithreading is to call _beginthread()
on each task of the function and then wait for all the threads to finish, right?
How do I know if that's gonna be efficient and actually benefit to minimize big_task()
running time?
I also heard that multithreading efficiency depends on the platform and hardware of the client. That means that it's something I need to query in the beginning of my program as well..?
One more question, when coding in Windows, is it better to use CreateThread()
rather than _beginthread()
? I write cross platform applications but if CreateThread()
is more efficient than I could specialize my code to use that in Windows.