AsyncPump Class | |
Represents a pump that runs an asynchronous method and all its continuations on the current thread.
Inheritance Hierarchy
Namespace: Lawo.Threading.TasksAssembly: Lawo (in Lawo.dll) Version: 1.4.1707.27006
Syntax public static class AsyncPump
The AsyncPump type exposes the following members.
Methods
| Name | Description |
---|
| Run | Runs asyncMethod on the current thread. |
TopRemarks 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
(
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.
Thread Safety Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also