How do you force a thread to run on a specific processor?
- From: "kaiteriteri" <kaiteriteri@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 Apr 2005 09:13:02 -0700
I have a time-consuming VB.net application that i'd like to thread over
2 processors (that's all i've got in my machine!) and, hopefully, get it
done in
half the time. On running, the application should create a 2nd thread and run
it on the other processor (processing a distinct set of data), leaving the
current
thread to run and process its set of data. But the 2nd thread must run on the
free processor, otherwise there's no point...
Can someone point me towards a VB.net example that does this?
{I see mention elsewhere of Get/Set of AffinityMasks within Threads but not
any examples of its usage for this type of thing, I believe this is the
property
that is used to force a specific processor to be used.}
.
- Follow-Ups:
- RE: How do you force a thread to run on a specific processor?
- From: AMercer
- Re: How do you force a thread to run on a specific processor?
- From: Herfried K. Wagner [MVP]
- RE: How do you force a thread to run on a specific processor?
- Prev by Date: RE: Treeview Images
- Next by Date: Re: How to detect when items are added to Combobox/Listbox
- Previous by thread: Register DLL on another machine's VS.NET?
- Next by thread: Re: How do you force a thread to run on a specific processor?
- Index(es):