AsyncCollectionRequestMessage<T> creates a CancellationTokenSource that never gets disposed
まだ誰も着手していません。
評価
調査の方向性
src/CommunityToolkit.Mvvm/Messaging/Messages/AsyncCollectionRequestMessage{T}.cs から始めて、private な CancellationTokenSource がどのように作成され、使用されているかを確認します。メッセージの安全な破棄ライフサイクルを決定し、提案された API がキャンセルの動作を損なうことなく source を解放することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I was examining the code for the the AsyncCollectionRequestMessage class and I noticed it creates a private CancellationTokenSource that never gets Dispose() called on it.
I looked at CancellationTokenSource's dispose methods and it's non-trivial, potentially disposing of a System.ITimer and a ManualResetEvent - both things that are potentially finite resources, so better to release ASAP.
Regression
No response
Steps to reproduce
No reproduction, just observation of the code.
Expected behavior
There should be an opportunity to dispose the CancellationTokenSource. Most obvious possible way would be to make thing that comes to mind would be make AsyncCollectionRequestMessage<T> implement IDispose so that users could call it.
Screenshots
No response
IDE and version
VS 2022
IDE version
17.14.11
Nuget packages
- CommunityToolkit.Common
- CommunityToolkit.Diagnostics
- CommunityToolkit.HighPerformance
- CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)
8.4.0
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item
- 主要言語
- C#
- スター
- 3.8k
- フォーク
- 401
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommunityToolkit/dotnet のほかの issue
-
bug :bug:
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CommunityToolkit/dotnet#1206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
CommunityToolkit/dotnet#1186 ·
-
bug :bug:
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
CommunityToolkit/dotnet#648 ·
-
bug :bug:
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
CommunityToolkit/dotnet#1215 ·
-
feature request :mailbox_with_mail:
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
CommunityToolkit/dotnet#1214 ·
CommunityToolkit/dotnet の issue をすべて見る
似ている issue
-
bug P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nightscout/nocturne#1908 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation Needs: Triage :mag:
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
WPF: each page's `Title` overwrites the window title, and returning to a page does not restore itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows area/Docs partner/agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jamesmontemagno/tiny-clips#378 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信