humble_learner
September 24th, 2008, 06:18 AM
I came across the following statement while reading the article on optimizing code for multicore machines (http://msdn.microsoft.com/en-us/magazine/cc163340.aspx).
Can someone kindly explain in other words what the writer is attempting to say here ?
["A task is created by supplying an associated action that can potentially be executed in parallel. The action is executed somewhere between the creation time of the task and the first call to the Wait method. The associated action may be executed in parallel on another thread, but there is a guarantee that the action will not migrate among threads. This is a useful guarantee since programmers can use thread affine abstractions like Windows critical sections without having to worry, for example, that the LeaveCriticalSection is executed in a different thread than the EnterCriticalSection. "]
I wanted a clarification on the sentence regarding thread affine abstractions. Can someone please let me know what that means and how it is related to the CriticalSection blocks ?
Can someone kindly explain in other words what the writer is attempting to say here ?
["A task is created by supplying an associated action that can potentially be executed in parallel. The action is executed somewhere between the creation time of the task and the first call to the Wait method. The associated action may be executed in parallel on another thread, but there is a guarantee that the action will not migrate among threads. This is a useful guarantee since programmers can use thread affine abstractions like Windows critical sections without having to worry, for example, that the LeaveCriticalSection is executed in a different thread than the EnterCriticalSection. "]
I wanted a clarification on the sentence regarding thread affine abstractions. Can someone please let me know what that means and how it is related to the CriticalSection blocks ?