Dividing task into processors

  • Thread starter Thread starter Radek
  • Start date Start date
R

Radek

Is it possible to order that task has to be executed by exactly that
processor? I mean: When I have to or more processors in my computer I would
like to say, that task X has to be executed only by processor 1 and task Y
only by processor 2. Does .NET allow to do something like that?
 
I do not think it's wise idea.
Anyway:

Check the SetThreadAffinityMask API.

not sure how .NET System.Threading.Thread relates to Windows threads though.
My guess it's the same thing but you need to get Window's handle to the .NET
thread somehow.

George.
 
..net has no built in support, but you just call the winapi routines
SetProcessAffinityMask or SetThreadAffinityMask.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top