Hi there,I've been working on a threaded game engine for a few weeks now using TBB and I've hit a bit of a snag.Sorry the explanation is wrong but I want to explain my reasoning behind why I want it like I do.Basically my entire engine is arranged as a flow_graph, with many of the nodes spawning new tasks using parallel_for to do the massively parallel operations of the particular module. Similar to how the intel multi-threaded animation example achieves it I have a generic task which knows how to run my function prototype and a task set class which spawns n generic tasks using a parallel_for.My problem is I want to create a task/almost a thread for loading in all of the game assets. I'd planned to run a non-blocking task which would load in the files while the main game tree keeps looping and animating some sort of loading screen. Load completion would be notified using an atomic reference counter at which point the main game tree will begin runnning the full application.However whenever I try to spawn my task I get various forms of error - some of the error messages also seem to be wrong - they reference tbb 1.0 on a z: drive which my machine doesn't have.I've done a little more reading and found Asynchronous tasks don't seem to be supported yet.I was wandering if there is a way to achieve this result without having to create full blown threads.The majority of loading will take place at the start of the application with a few sporadic loads while its running as users add/remove items to the world so I feel a full blown thread is probably overkill. I'm also converned that an idling thread is wasting my system resources, preventing tbb from using and interupting my application flow every now and then to check for more data.I see asset loading as a non constant task - something that only happens when it needs to, unlike phyics etc which would be run each frame. Loading may happen or it may not.Putting it in the main tree would block the frame until all loads are complete which defies the point of what I want to do.I've tried the example in the documentation - "Letting main thread work while child tasks run" but it doesn't work in my case as these child tasks are being allocated from within a task tree. My errors seem to occur as execution leaves the tasks that launched these loading tasks - provided it makes it that far - there are also sometimes exceptions thrown or occasionally it works (presumably the load task finished before it became a problem for the allocator and referece counter)Running the task and waiting for it to complete however works without error.Thanks very much!
For more complete information about compiler optimizations, see our Optimization Notice.