Implement a Dispose method has contradictory example to documentation about thread synchronization
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 57/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
Read docs/standard/garbage-collection/implementing-dispose.md, especially the custom safe handle section and its note about SafeHandle.ReleaseHandle. Compare that note with the example's Interlocked.CompareExchange use, then verify the accurate explanation with the relevant .NET disposal guidance. Update the example or note so they agree and the synchronization behavior is clear.
索引モデルが issue の本文から書いたものです。
説明
Type of issue
Missing information
Description
On the page Implement a Dispose method, the section Implement the dispose pattern using a custom safe handle has a NOTE section that says:
[!NOTE]
- ....
- There is no need for synchronization to guarantee thread safety. Even though there is a race condition in the Dispose implementation of DisposableBaseWithSafeHandle, SafeHandle guarantees that SafeHandle.ReleaseHandle is called only once.
However, the example under that specific section, "Implement the dispose pattern using a custom safe handle", still includes thread synchronization using Interlocked.CompareExchange. This is contradictory and confusing. Should the thread synchronization be remove that that specific example - or is the statement about not needing thread synchronization incorrect?
Page URL
Content source URL
https://github.com/dotnet/docs/blob/main/docs/standard/garbage-collection/implementing-dispose.md
Document Version Independent Id
9c754da1-c234-fb12-580b-0fcf9ffe2c20
Platform Id
de77d8c7-6af8-0b64-9357-30e46ab49cbd
Article author
@gewarren
Metadata
- ID: 572ef6c6-5066-4a14-76a0-c3fb4b62e604
- PlatformId: de77d8c7-6af8-0b64-9357-30e46ab49cbd
- Service: dotnet-fundamentals
- 主要言語
- 言語のデータがありません
- スター
- 4.8k
- フォーク
- 6.1k
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 259
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/docs のほかの issue
-
Improve description of `limitations of extensions`対応中かも @Manish-1kumar が 5 日前に担当しました。 オープンadvanced-concepts/subsvc dotnet-csharp/svc
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
dotnet/docs#56626 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
dgオープンdotnet-fundamentals/svc needs-more-info
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
dotnet/docs#56549 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Document unit-test / theory-data impact of .NET 11 double→decimal conversion対応中かも @SkyDevLab が 16 日前に担当しました。 オープン:watch: Not Triaged dotnet-fundamentals/svc
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
dotnet-fundamentals/svc install/subsvc
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dotnet/docs#56344 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Missing information on the connection string page in Microsoft.Data.Sqlite when SqliteConnectionStringBuilder.Pooling=true対応中かも @SkyDevLab が 13 日前に担当しました。 オープン:watch: Not Triaged
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
obsidianmd/obsidian-developer-docs#281 ·
メンテナーはふだん 4 日以内に返信
-
Area: PDF support
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
orbeon/orbeon-forms#8053 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
JWhite212/SignalLadder#213 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
aws-samples/sample-per-model-bedrock#782 ·
メンテナーはふだん 1 日以内に返信
-
docs(sync): document `sync.local_source` and how to recover entries written before v1.42.0対応中かも @jdx が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信