Table of Contents

Class AsyncHelpers

Namespace
Amazon.Runtime.Internal.Util
Assembly
AWSSDK.Core.dll

This is a utility class to be used in last resort for code paths that are synchronous but need to call an asynchronous method. This should never be used for methods that are called at high volume as this utility class has a performance cost. For example this class was added for the refreshing credentials like Cognito which would need to use this about once an hour.

public static class AsyncHelpers
Inheritance
AsyncHelpers
Inherited Members

Methods

RunSync(Func<Task>)

public static void RunSync(Func<Task> workItem)

Parameters

workItem Func<Task>

RunSync<T>(Func<Task<T>>)

public static T RunSync<T>(Func<Task<T>> workItem)

Parameters

workItem Func<Task<T>>

Returns

T

Type Parameters

T