My first idea is just to use threads everywhere lets say I have an init function in some class that in single threaded form would look like this (psuedocode):
Init()
{
load file from disk or zip file
process file
do unrelated variable initialization
do creation of scene nodes
}
The idea would be to do creation of threads as they would be needed; for example:
Init()
{
Thread(load file from disk)
initialize the unrelated variables here
Thread(initialize the scene nodes)
WaitForThread(load file from disk)
now process the loaded data
}
The thing about that one is, I don't know if creating threads all the time would incur too much overhead. The other idea I had was to have a task manager. It would create as many threads as processor cores and update an equal number of tasks on each core. So my previous code example would just replace the threads with processes; which may or may not be updated on a seperate core, depending on how many processes are running at once.
Which one sounds better?