Class Future<T>
Represents Future pattern that can be converted into Task.
Inherited Members
Namespace: DotNext.Threading.Tasks
Assembly: DotNext.dll
Syntax
public abstract class Future<T> : Future, IFuture, INotifyCompletion, IConvertible<T> where T : Task
  Type Parameters
| Name | Description | 
|---|---|
| T | The type of task that is supported by awaitable object.  | 
      
Constructors
| Improve this Doc View SourceFuture(Boolean)
Initializes a new Future.
Declaration
protected Future(bool runContinuationsAsynchronously = true)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Boolean | runContinuationsAsynchronously | true to force continuations to run asynchronously; otherwise, false.  | 
      
Methods
| Improve this Doc View SourceAsTask()
Converts this awaitable object into task of type T.
Declaration
public abstract T AsTask()
  Returns
| Type | Description | 
|---|---|
| T | The task representing the current awaitable object.  | 
      
Remarks
This method can cause extra allocation of memory. Do not use it for await scenario.
It is suitable only for interop with WhenAll(IEnumerable<Task>)
or WhenAny(IEnumerable<Task>).
Explicit Interface Implementations
| Improve this Doc View SourceIConvertible<T>.Convert()
Declaration
T IConvertible<T>.Convert()
  Returns
| Type | Description | 
|---|---|
| T |