Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
set manually task on cores in c#
Posted
Comments
Kim Togo 28-May-11 13:06pm    
By "Task" I assume you refer to "Threading"

Please see my detailed answer here:
How to program multicore[^].

With .NET, you can use System.Threading.Thread.BeginThreadAffinity/EndThreadAffinity, for compact Framework — System.Threading.Thread.SetProcessorAffinity.

Again, you can do it if your absolutely sure what are you doing. It can make more hard than good.

Good luck,
—SA
 
Share this answer
 
Comments
Kim Togo 28-May-11 13:07pm    
5 for here. The link is bookmarked.
Sergey Alexandrovich Kryukov 28-May-11 13:15pm    
Thank you, Kim.
--SA
thatraja 28-May-11 14:17pm    
Fine Answer SA. Voted both answers
Sergey Alexandrovich Kryukov 28-May-11 14:27pm    
Thank you very much.
--SA
TweakBird 28-May-11 15:23pm    
Good answer. my 5!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-May-11 12:55pm    
Correct, but one can also set affinity for a thread and get warning about doing so. (I voted 4.)
I repeat same answer as before.
--SA
Kim Togo 28-May-11 13:04pm    
Thanks SA. Yes your are right. There is there is more than just. Next time I refer to you answer under "How to program multicore" :-)
There are many repeating Questions her. Perhaps by making a TOP 10 her at Codeproject can help?
Sergey Alexandrovich Kryukov 28-May-11 13:21pm    
Interesting idea. How would it look?
I also don't know what would be selected for top and how many.
I support my list of popular topics where I reuse my past answers, but there are almost 100 items in it, in many of the I have 2-3 references. In my list there are only questions that were answered more than once. Only, I personally do not participate is many big topics.
Dave Kreskowiak 29-May-11 0:33am    
No, not really. These are the same people who can't be bothered to use Google to find the answer to their question that's already been asked and answered about 3,000,000 other times all over the web. What makes you think they'll read a Frequently Asked Questions list?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900