AsyncCollectionRequestMessage<T> creates a CancellationTokenSource that never gets disposed
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với src/CommunityToolkit.Mvvm/Messaging/Messages/AsyncCollectionRequestMessage{T}.cs và kiểm tra cách CancellationTokenSource riêng tư của nó được tạo và sử dụng. Xác định vòng đời giải phóng an toàn cho message, sau đó xác minh rằng API được đề xuất giải phóng source mà không làm hỏng hành vi hủy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C#
- Star
- 3.8k
- Fork
- 401
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommunityToolkit/dotnet
-
RelayCommand<T>.CanExecute(null) returns false for value types without a predicateCó thể đã có người làm @apachezy đã nhận 83 ngày trước. Đang mởbug :bug:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
CommunityToolkit/dotnet#1206 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CommunityToolkit/dotnet#1186 ·
-
bug :bug:
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
CommunityToolkit/dotnet#648 ·
-
bug :bug:
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
CommunityToolkit/dotnet#1215 ·
-
Add segmented buffering and sequence reads to `ArrayPoolBufferWriter<T>`Có thể đã có người làm @paulomorgado đã nhận 20 ngày trước. Đang mởfeature request :mailbox_with_mail:
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
CommunityToolkit/dotnet#1214 ·
Tất cả issue của CommunityToolkit/dotnet
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
pyrevitlabs/pyRevit#3792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: design documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eyalgolan/statecraft-israel#883 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
area/indexing bug package/core triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày