mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-27 05:37:10 +08:00
16 lines
563 B
C#
16 lines
563 B
C#
using System.Runtime.CompilerServices;
|
|
|
|
namespace PooledAwait
|
|
{
|
|
/// <summary>
|
|
/// Provides async/await-related extension methods
|
|
/// </summary>
|
|
public static class AwaitableExtensions
|
|
{
|
|
/// <summary>Controls whether a yield operation should respect captured context</summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static ConfiguredYieldAwaitable ConfigureAwait(this YieldAwaitable _, bool continueOnCapturedContext)
|
|
=> new ConfiguredYieldAwaitable(continueOnCapturedContext);
|
|
}
|
|
}
|