dotnet / dotnet/dotnet-api-docs
default spin count not specified for constructors that don't explicitly set it
- 主要言語
- C#
- スター
- 949
- フォーク
- 1.7k
- 平均マージ
- 3日 27分
- マージ済み PR(30日)
- 49
説明
There are three constructors for ManualResetEventSlim. Two don't specify the spin count, while one does. The class is supposed to spin for some amount of time before falling back to a normal wait handle wait. The problem is, I have no clue what the default spin count is, if I don't specify it. By putting in a value, I don't know if I'm speeding it up or slowing it down. The documentation would be better if it could say, "Calling the parameterless constructor makes a new ManualResetEventSlim with a spin count of 10," or if a specific amount isn't something you want to publicly commit to, at least a general idea of what the number is set to, or some hints about the rules that are used to make the decision. Because I don't know what the default is, it's harder to make a decision about which constructor I ought to be using. I suppose my only fallback option is to create it and check the SpinCount property.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 094c5713-5b4f-8928-2f63-d6ea692baf27
* Version Independent ID: 0bf6da8d-78a1-9ada-46f7-7e8bc8ae8146
* Content: [ManualResetEventSlim Constructor (System.Threading)](https://docs.microsoft.com/en-us/dotnet/api/system.threading.manualreseteventslim.-ctor?view=netframework-4.7.2#System_Threading_ManualResetEventSlim__ctor)
* Content Source: [xml/System.Threading/ManualResetEventSlim.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Threading/ManualResetEventSlim.xml)
* Product: **.net**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
コントリビューションガイド
調査の方向性
xml/System.Threading/ManualResetEventSlim.xml から始め、3 つすべてのコンストラクターのエントリと、SpinCount プロパティのドキュメントを確認します。パラメーターなしのコンストラクターについてどのような既定の動作を文書化できるかを確認し、その後、ユーザーが SpinCount の動作を明確に理解したうえでオーバーロードを選択できるようにコンストラクターのテキストを更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100