From: Jonathan de Boyne Pollard on
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<blockquote
cite="mid:ddacd63d-f5b2-471b-a3f3-843faf56c1f7(a)c34g2000yqn.googlegroups.com"
type="cite">
<blockquote cite="mid:__p7n.9374$Yt6.5766(a)newsfe23.iad" type="cite">
<blockquote type="cite">
<p>Danger lies there. Windows does not absolutely guarantee that
if you have affinity set, you will only ever execute on that core. If
the scheduler feels it has to run you on another one, it will.
</p>
</blockquote>
<p>Humm... Can you please provide me with some official
documentation that explains how <code>SetThreadAffinityMask()</code>
is not reliable? </p>
<p>BTW, are you sure that you are not writing about <code>SetThreadIdealProcessor()</code>?
Or, perhaps are you writing about the fact that if processor P1 is
running Thread T, and you bind the affinity of T toprocessor P1, then T
will continue to run on P1 <em>until</em> it is rescheduled on P2?</p>
</blockquote>
<p wrap="">It is my understanding that if you call <code>SetThreadAffinityMask()</code>
and disallow the current processor, the call will not return until the
thread has been rescheduled.<br>
</p>
</blockquote>
<p>Your understanding is certainly in agreement with the Microsoft
documentation, referenced earlier in this discussion thread.&nbsp; (-:</p>
</body>
</html>