Skip to content

Async readers are disposed with ConfigureAwait(false) - #119

Merged
electricessence merged 1 commit into
masterfrom
fix/await-using-configureawait
Nov 11, 2026
Merged

electricessence merged 1 commit into
masterfrom
fix/await-using-configureawait

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

Async readers are disposed with ConfigureAwait(false).

On netstandard2.1 and net10.0 the async command paths disposed their DbDataReader with a plain await using, so DisposeAsync resumed on the caller's context, against the library rule of ConfigureAwait(false) on every await. Each one now uses the form Transaction.cs already uses:

#if NETSTANDARD2_0
using DbDataReader reader = await ...ConfigureAwait(false);
#else
DbDataReader reader = await ...ConfigureAwait(false);
await using var readerDisposal = reader.ConfigureAwait(false);
#endif

Ten places: nine in Command._.cs and one in ExpressiveCommandBase.cs. No other await using in the source lacks it. Behavior is otherwise unchanged; netstandard2.0 still disposes synchronously (its DbDataReader has no DisposeAsync). #117 makes the same change in the command view.

Found by the multi-reviewer pass over #111-#118.

Checks

  • Release and Debug builds: 0 warnings, 0 errors. Tests: 9519 of 9519 pass in both. Samples: 98 of 98 checks pass. Style and analyzers: 0 findings. DocFX: 0 warnings.

🤖 Generated with Claude Code

On netstandard2.1 and net10.0 the reader was disposed with a plain 'await using', so its DisposeAsync resumed on the caller's context. Each one now uses the same form as Transaction.cs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@electricessence
electricessence merged commit 79291d6 into master Nov 11, 2026
2 checks passed
@electricessence
electricessence deleted the fix/await-using-configureawait branch November 11, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant