C# Class Lawo.Threading.Tasks.AsyncPump

Represents a pump that runs an asynchronous method and all its continuations on the current thread.
Some asynchronous methods expect that all its continuations are executed on the same thread. If such code needs to be run in an environment where this is not guaranteed (SynchronizationContext.Current is either null or is a SynchronizationContext object that schedules continuations on different threads as under ASP.NET) then this class can be used to force execution on a single thread.
Exibir arquivo Open project: Lawo/ember-plus-sharp Class Usage Examples

Public Methods

Method Description
Run ( Func asyncMethod ) : void

Runs asyncMethod on the current thread.

Method Details

Run() public static method

Runs asyncMethod on the current thread.
completed in the /// state.
public static Run ( Func asyncMethod ) : void
asyncMethod Func
return void