Dividing task into processors

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?
 
G

George Ter-Saakov

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.
 
B

bruce barker

..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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top