XNA's update and draw methods do in fact happen in a single thread. In order to utilize other threads on the machine, or do long running calculations across multiple frames you can utilize C#'s asynchronous function calls. The basic idea is, you start a calculation by invoking an asynchronous function, this function will execute in a new context on the machine and won't block your main update thread. The trouble now is getting the result of the calculation back. Here's a quick example that I think is free of race conditions:
private volatile object Result = null;
private volatile bool CalculationInProgress = false;
private void AsyncCalculation() {
Result = DoSomeStuffThatTakesAWhile();
CalculationInProgress = false
}
public override Update(GameTime time) {
if(Result == null) {
if(!CalculationInProgress) {
CalculationInProgress = true;
((Action)AsyncCalculation).BeginInvoke(null, this);
}
else {
UseResult(Result);
Result = null;
}
}
I hope this gives a general idea of how .BeginInvoke could be used in your case. You're basically polling your result in each update call until it is completed.You don't need to use Action either, Action is a delegate that takes no parameters and returns void, if you need to pass parameters and have an output take a look at Func<>.
There may be a more simple way, I would very much enjoy seeing a simpler solution in C#. Hope this gives you a bit of a starting point though.
Update()
norDraw()
. Because of the way the XNA engine works, I don't think it is possible to do what you want in another way... \$\endgroup\$