Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

AsyncLocal<T> Class Article

Đang mở Phù hợp với người mới
#13,091 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
90/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
documentation

Hướng nghiên cứu

Mở nội dung XML tại System.Threading/AsyncLocal`1.xml và tìm đầu ra ví dụ của AsyncLocal. So sánh với thứ tự đã được sửa trong issue, sau đó xác minh rằng bài viết API được kết xuất tại URL trang được cung cấp hiển thị đúng chuỗi đầu ra mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area-System.Threading untriaged
Type of issue

Other (describe below)

Description

The example output provided in this specific article is incorrect. Rather than
// The example displays the following output:
// Entering AsyncMethodB.
// Expected 'Value 1', AsyncLocal value is 'Value 1', ThreadLocal value is 'Value 1'
// Entering AsyncMethodB.
// Expected 'Value 2', AsyncLocal value is 'Value 2', ThreadLocal value is 'Value 2'
// Exiting AsyncMethodB.
// Expected 'Value 2', got 'Value 2', ThreadLocal value is ''
// Exiting AsyncMethodB.
// Expected 'Value 1', got 'Value 1', ThreadLocal value is ''

It should have been
Entering AsyncMethodB.
Expected 'Value 1', AsyncLocal value is 'Value 1', ThreadLocal value is 'Value 1'
Entering AsyncMethodB.
Expected 'Value 2', AsyncLocal value is 'Value 2', ThreadLocal value is 'Value 2'
Exiting AsyncMethodB.
Expected 'Value 1', got 'Value 1', ThreadLocal value is ''
Exiting AsyncMethodB.
Expected 'Value 2', got 'Value 2', ThreadLocal value is ''

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1?view=net-10.0

Content source URL

https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.Threading/AsyncLocal`1.xml

Document Version Independent Id

05321180-eca9-f7dd-9abc-2111f2d0dc19

Platform Id

39033060-77e9-4a7f-b5e4-5a827208dab7

Article author

@dotnet-bot

Ngôn ngữ chính
C#
Star
950
Fork
1.7k
Merge trung bình
1 ngày 16 giờ
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/dotnet-api-docs

Tất cả issue của dotnet/dotnet-api-docs

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.