Class Future
Represents lightweight version of 
Namespace: DotNext.Threading.Tasks
Assembly: DotNext.dll
Syntax
public abstract class Future : object, IFuture, INotifyCompletion
  Remarks
This data type is primarily used for bridging between synchronous or legacy asynchronous code into
await-friendly form. It is NOT a replacement of 
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.  | 
      
Properties
| Improve this Doc View SourceIsCompleted
Determines whether asynchronous operation referenced by this object is already completed.
Declaration
public abstract bool IsCompleted { get; }
  Property Value
| Type | Description | 
|---|---|
| Boolean | 
Methods
| Improve this Doc View SourceComplete()
Moves this Future into completed state and execute all attached continuations.
Declaration
protected void Complete()
  OnCompleted(Action)
Attaches the callback that will be invoked on completion.
Declaration
public void OnCompleted(Action callback)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Action | callback | The callback to be attached to the asynchronous operation which result is represented by this awaitable object.  | 
      
Implements
      INotifyCompletion