Background
Polyfill 10.3.0 (included in #430) adds a polyfill for the ConfigureAwaitOptions enum introduced in .NET 8. This enum is now available on all target frameworks including netstandard2.0 and net462.
Opportunity
The library currently has 527 .ConfigureAwait(false) call sites. ConfigureAwait(false) remains the right choice for the general case, but ConfigureAwaitOptions unlocks one new capability worth evaluating:
ConfigureAwaitOptions.SuppressThrowing
Available via the polyfill on pre-net8 targets, this option silently absorbs exceptions from an awaited Task instead of re-throwing them — equivalent to wrapping every awaited call in a try/catch and discarding the exception. It is intended for disposal and cleanup paths where a cancellation or failure should not propagate.
Example patterns to look for:
// Cleanup/dispose paths that catch and discard OperationCanceledException
try
{
await someTask.ConfigureAwait(false);
}
catch (OperationCanceledException) { }
// Fire-and-forget completions where the caller doesn't want exceptions surfaced
Could become:
await someTask.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
Action
Audit the existing async code for any try/catch patterns around ConfigureAwait(false) that swallow OperationCanceledException or similar. Replace with SuppressThrowing where it makes the intent clearer.
Reference
Background
Polyfill 10.3.0 (included in #430) adds a polyfill for the
ConfigureAwaitOptionsenum introduced in .NET 8. This enum is now available on all target frameworks includingnetstandard2.0andnet462.Opportunity
The library currently has 527
.ConfigureAwait(false)call sites.ConfigureAwait(false)remains the right choice for the general case, butConfigureAwaitOptionsunlocks one new capability worth evaluating:ConfigureAwaitOptions.SuppressThrowingAvailable via the polyfill on pre-net8 targets, this option silently absorbs exceptions from an awaited
Taskinstead of re-throwing them — equivalent to wrapping every awaited call in a try/catch and discarding the exception. It is intended for disposal and cleanup paths where a cancellation or failure should not propagate.Example patterns to look for:
Could become:
Action
Audit the existing async code for any try/catch patterns around
ConfigureAwait(false)that swallowOperationCanceledExceptionor similar. Replace withSuppressThrowingwhere it makes the intent clearer.Reference