Document InvalidOperationException for AsyncReaderWriterLock acquisition methods#1466
Merged
Conversation
Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Documenting
Document InvalidOperationException for AsyncReaderWriterLock acquisition methods
Jun 11, 2025
InvalidOperationException for ReadLockAsync (and possibly other methods)
AArnott
approved these changes
Jun 11, 2025
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
davkean
approved these changes
Jun 11, 2025
ekoppel
approved these changes
Jun 11, 2025
This was referenced Jun 22, 2026
Merged
Open
This was referenced Jun 22, 2026
Open
Open
Merged
Merged
Open
Merged
Closed
Open
Merged
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds XML documentation for the
InvalidOperationExceptionthat is thrown by lock acquisition methods (ReadLockAsync,UpgradeableReadLockAsync,WriteLockAsync) whenComplete()has been called on theAsyncReaderWriterLock.Changes Made
/// <exception cref="InvalidOperationException">documentation to all five lock acquisition method overloadsUpgradeableReadLockAsync(LockFlags)method (was incorrectly described as "Obtains a read lock" instead of "Obtains an upgradeable read lock")Background
When
AsyncReaderWriterLock.Complete()is called, the lock is marked for completion and any subsequent new top-level lock requests throw anInvalidOperationExceptionwith the message:This behavior was already implemented and tested (see
CompleteBlocksNewTopLevelLocksSTAandCompleteBlocksNewTopLevelLocksMTAtests), but the public API methods lacked documentation about this exception.Example
The changes are minimal and only add documentation without modifying any functionality.
Fixes #1128.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
1elvsblobprodwus2177.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)2wrvsblobprodwus2180.vsblob.vsassets.iodotnet build(dns block)31bvsblobprodwus2143.vsblob.vsassets.iodotnet build(dns block)5o1vsblobprodwus2115.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)78kvsblobprodwus2152.vsblob.vsassets.iodotnet build(dns block)8wdvsblobprodwus2137.vsblob.vsassets.iodotnet build(dns block)9yyvsblobprodwus2157.vsblob.vsassets.iodotnet build(dns block)abcvsblobprodwus2161.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)an0vsblobprodwus2146.vsblob.vsassets.iodotnet build(dns block)b15vsblobprodwus2164.vsblob.vsassets.iodotnet build(dns block)b53vsblobprodwus2154.vsblob.vsassets.iodotnet build(dns block)cffvsblobprodwus218.vsblob.vsassets.iodotnet build(dns block)d94vsblobprodwus2119.vsblob.vsassets.iodotnet build(dns block)dyrvsblobprodwus2173.vsblob.vsassets.iodotnet build(dns block)fcwvsblobprodwus2113.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)h8evsblobprodwus2120.vsblob.vsassets.iodotnet build(dns block)i01vsblobprodwus216.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)isovsblobprodwus211.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)jk4vsblobprodwus2186.vsblob.vsassets.iodotnet build(dns block)jlovsblobprodwus2163.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)km4vsblobprodwus2183.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)mdcvsblobprodwus2159.vsblob.vsassets.iodotnet build(dns block)nypvsblobprodwus2178.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)pkwvsblobprodwus2126.vsblob.vsassets.iodotnet build(dns block)s0ivsblobprodwus2134.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)s8nvsblobprodwus2158.vsblob.vsassets.iodotnet build(dns block)v41vsblobprodwus2175.vsblob.vsassets.iodotnet build(dns block)vd2vsblobprodwus2150.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)vipvsblobprodwus2139.vsblob.vsassets.iodotnet build(dns block)wztvsblobprodwus2155.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)x0dvsblobprodwus2111.vsblob.vsassets.iodotnet build(dns block)x1mvsblobprodwus2181.vsblob.vsassets.iodotnet build(dns block)xktvsblobprodwus2141.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)xofvsblobprodwus2114.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)y1mvsblobprodwus2138.vsblob.vsassets.iodotnet build(dns block)z2bvsblobprodwus2185.vsblob.vsassets.iodotnet build(dns block)dotnet build src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj --nologo(dns block)zaxvsblobprodwus215.vsblob.vsassets.iodotnet build(dns block)If you need me to access, download, or install something from one of these locations, you can either: