I apologize for the forum thread necromancery. I understand the whole concurrency issue, and understand that MP thread synchronization is difficult and annoying... I'm trying to figure it out in VB.net right now for some work-related stuff...
But...shouldn't it be possible to split discreet, non-realtime tasks off from the main thread and have them return later on, within a given time-frame?
For example...
1. Main thread decides that temperature overlay for map is outdated...
2. Main thread decides that since [SMP:ON] it will fire up a thread to update temperatures; said thread must return within 10 gameplay frames....
3. Main thread instantiates subsidiary thread (foo), and passes it necessary data.
4. Main thread continues for 10 gameplay frames, while thread (foo) processes temperature update of map.
5. After 10 frames, thread (foo) is queried to see if it has completed results. If it has, and is not locked, thread (foo) returns the results to main thread, and is destroyed. If thread (foo) is locked or has not returned results, it is signalled to stop, and main thread processes temperature update of map on next frame using its own resources.
A pattern like this of making the main thread robust enough to do the task of the subsidiary thread in the event that the subsidiary thread fails to return data should be able to resolve concurrency issues, although it probably isn't an efficient use of resources...but it might be a way to start with MP? What do others think?