Content deleted Content added
m Fixing "Pages with ISBN errors" error in citation |
|||
Line 12:
TPL also includes other constructs like ''Task'' and ''[[Future (programming)|Future]]''. A ''Task'' is an action that can be executed independent of the rest of the program. In that sense, it is semantically equivalent to a thread, except that it is a more light-weight object and comes without the overhead of creating an OS thread. Tasks are queued by a ''Task Manager'' object and are scheduled to run on multiple OS threads in a [[thread pool pattern|thread pool]] when their turn comes.
''Future'' is a task that returns a result. The result is computed in a background thread encapsulated by the ''Future'' object, and the result is buffered until it is retrieved.<ref name="msdnmag"/> If an attempt is made to retrieve the result before it has been computed then the requesting thread will block until the result is available.<ref name="Concurrent_Programming_on_Windows_Appendix_B">{{cite book | first=Joe | last=Duffy | year=2009 | title=Concurrent Programming on Windows | isbn=
The other construct of TPL is '''Parallel''' class.
|