Is it safe to run multiple XNA ContentManager instances on multiple threads?

Posted by Boinst on Game Development See other posts from Game Development or by Boinst
Published on 2012-11-02T00:55:06Z Indexed on 2012/11/02 11:20 UTC
Read the original article Hit count: 177

Filed under:
|

My XNA project currently uses one ContentManager instance, and one dedicated background thread for loading all content.

I wonder, would it be safe to have multiple ContentManager instances, each in it's own dedicated thread, loading different content at the same time?

I'm prompted to ask this question because this article makes the following statement:

If there are two textures created at the same time on different threads, they will clobber the other and you will end up with some garbage in the textures.

I think that what the author is saying here, is that if I access one ContentManager simultaneously on two threads, I'll get garbage. But what if I have separate ContentManager instances for each thread?

If no-one knows the answer already from experience, I'll go ahead and try it and see what happens.

© Game Development or respective owner

Related posts about XNA

Related posts about multithreading