fix: 修正 AQS 文档中 tryReleaseShared 方法签名错误#2834
Closed
Senrian wants to merge 2 commits intoSnailclimb:mainfrom
Closed
fix: 修正 AQS 文档中 tryReleaseShared 方法签名错误#2834Senrian wants to merge 2 commits intoSnailclimb:mainfrom
Senrian wants to merge 2 commits intoSnailclimb:mainfrom
Conversation
将 tryReleaseShared(int) 修正为 tryReleaseShared(boolean),与 JDK AQS 实际方法签名一致。 对应 issue: Snailclimb#2832
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.
修复说明
在 JavaGuide 的 AQS 文档中,独占模式与共享模式的特性对比表里,
需要重写的模板方法行的共享模式部分,错误地将tryReleaseShared的签名写成了(int),正确的签名应该是(boolean),与 JDKAbstractQueuedSynchronizer中的实际方法声明一致。修改内容:
docs/java/concurrent/aqs.mdtryReleaseShared(int)->tryReleaseShared(boolean)对应 Issue: #2832