Actually I was just looking into this today. I was looking at Intel TBB. You should google it. Also for single core systems that have a newer Nvidia GPU I was looking at Nvidia Cuda which allows you to use the GPU processor like a second(or higher depending on how many cores you already have)processor. Interesting stuff.
Even an asyncronous call on a single processor is faster than straight code. Though it does eat up resources and can cause the main code to slow down a little. In the long run it is benificial.
Quote: "Can you guarantee that your computer is actually using all it's cores on your program?"
Assuming you know how many cores to support and how to set the affinity for them...
Quote: "Are you threading your program to make the must use of them?"
Well I guess that would be answered differently by everyone. I personally have not incorperated it into a game yet. Oh wait yes I did. I used a seperate thread in a texas holdem game to calculate hand strength..probability of victory and stuff. I had to because the library I used to calculate the information was pretty slow. and I did not want the few second pause in the game.. I moved it to another thread and allowed that information to be calculated while the hand continued to be played.
Quote: "Can you even thread a for loop?"
I think you can thread just a for loop using OpenMD(never tried it myself, just have documentation to go off of, and even that is pretty vague), but other than that I think you have to have the loop inside a function call for most other threading applications.
Quote: "Does one thread have to wait until another thread is complete to make use of what it's done?"
Technically speaking yes, but at the same time no. Threading is a complicated subject to even idealize sometimes. Most of the time you would make an asyncronous call to a function and continue on through your program. Once the function completed you would have a callback to do any post processing for the thread. Native thread mainainance is a very complex ordeal. For the application of updating the way a lot of objects faced in a scene I think this would be a good use for another thread because I think you can make the db function calls from within that outside thread. and the way the GDK is put together you dont have to worry about complex operations like passing images, or other non thread safe data between them.
But I could be wrong I have yet to actually try using multithreading with the GDK. At the moment it is just fun to think about.
if(enemy == Amnzero) runAway();
Amnzero->WebSite = L"http://neovance.com/";