The topic needs a bit more detail on some aspects of lock state transition

未关闭
#51,205 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
45/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
csharp
领域
documentation

调研方向

打开 docs/fundamentals/runtime-libraries/system-threading-readerwriterlockslim.md,查看 ReaderWriterLockSlim 的锁转换部分及其示例。添加明确说明:从 Upgradable Read 升级到 Write 会保留两个锁,并且必须退出两个锁;文档应直接向新用户说明这一行为。

由索引模型根据 Issue 内容生成。

描述

:watch: Not Triaged dotnet-fundamentals/svc
Type of issue

Missing information

Description

The article glosses over one detail of the lock behaviour that seems to be implied by the code examples (which are rather long and thus difficult to parse), but not directly stated.

If you enter the lock in Upgradable Read mode, and then upgrade to Write mode, you then have both an upgradable-read and a write lock, and need to exit both. This should be made clear, as it is possible to assume that if you enter in Upgradable Read, then upgrade to Write, you now just have a write lock and only need to exit that.

It is a minor point, but stating it clearly would help avoid confusion for users who are first encountering a ReaderWriterLockSlim.

Page URL

https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-threading-readerwriterlockslim

Content source URL

https://github.com/dotnet/docs/blob/main/docs/fundamentals/runtime-libraries/system-threading-readerwriterlockslim.md

Document Version Independent Id

6f0202ff-800c-34a3-7634-c0652cfc2f62

Platform Id

8af8b763-311e-16d0-6a38-4a0425f2b1dd

Article author

@gewarren

Metadata
  • ID: 7b09b817-86df-eeca-bfe3-12605cf893bc
  • PlatformId: 8af8b763-311e-16d0-6a38-4a0425f2b1dd
  • Service: dotnet-fundamentals

Related Issues

主要语言
没有语言数据
星标
4.8k
派生
6.1k
平均合并
22 小时 46 分钟
30 天内合并 PR
296

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/docs 的其他 Issue

查看 dotnet/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。