
Setting Affinity on multi processor machines
Quote:
> Does anyone know how to set the affinity ( i.e. which processor an app
> uses)
> of an exe from within code (standard MFC MDI app). I am having
> problems with
> applications, using ODBC, intensively stopping unless it is only
> running on
> one processor.
When directly asked about this subject, one Microsoft propeller head
stated "Why would anyone want to do that?" This from the same people
that stated "Why would any program create more than a couple threads?
Aren't they only good for printing in the background?"
Theoretically you shouldn't have to worry about this. I bet you are
possibly having a problem with threads more than with processor
affinity. MFC in general and their database classes in particular
explode when you try to do anything with multiple threads. And for Gosh
sake, don't you dare try to access a database on any thread outside of
the user interface thread.