Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I would like to implement threading in my XNA game but I'm not sure how things work when compiling for the XBOX 360. Could someone elaborate on this?

For example, how many threads does XBOX support? I realize that XNA uses a special version of the Compact Framework. How does this affect the code during development? Do I implement things differently when developing for XBOX than Windows?

Thank you.

share|improve this question

1 Answer 1

Basicly, the xbox 360 has 6 hardware threads, spread over 3 cores. Two of these are reserved for the xna framework and general system use. Threading works the same as it does on the .net framework on windows,except you get an extra methods, SetProcessorAffinity. Unlike windows, the xbox dosnt do any fancy thread scheduling for you, so you have to tell it what hardware thread to run your thread on.

There are some good xbox aware thread pools out there, have a look on google if you need some example code, but if your confident with threading in windows that msdn page should give you all you need.

share|improve this answer
3  
Exactly. Just to complete the picture the threads are distributed as follows: RHRHCH. R = Reserved for XNA. H = 'Hyperthreaded' core. C = Physical core –  Jonathan Dickinson Aug 11 '10 at 15:39
    
I wouldn't call the two hardware threads per core "physical" versus "hyperthreaded" due to how the technology differs from the Intel implementation: arstechnica.com/old/content/2005/06/xbox360-2.ars –  Oskar Duveborn Oct 8 '11 at 21:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.