TaskFactory(TResult) Class

Task Parallel System.Threading

Provides support for creating and scheduling Task{TResult} objects.

Namespace:  System.Threading.Tasks
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True,  _
	ExternalThreading := True)> _
Public Class TaskFactory(Of TResult)
C#
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
	ExternalThreading = true)]
public class TaskFactory<TResult>

Type Parameters

TResult
The type of the results that are available though the Task{TResult} objects that are associated with the methods in this class.

Remarks

There are many common patterns for which tasks are relevant. The TaskFactory<(Of <(TResult>)>) class encodes some of these patterns into methods that pick up default settings, which are configurable through its constructors.

A default instance of TaskFactory<(Of <(TResult>)>) is available through the Task{TResult}.Factory property.

Inheritance Hierarchy

System..::.Object
  System.Threading.Tasks..::.TaskFactory<(Of <(TResult>)>)

See Also