Control or reject the blocking and scheduling members the surface classification lists as holes

Đang mở
#50 1 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp

Hướng nghiên cứu

Start with the surface classification and the existing controlled Task.Wait(), WaitAll(Task[]), WaitAny(Task[]), Task.Run, and ThreadPool.QueueUserWorkItem shims; inspect the classification test and docs/rule-inventory.md for the listed members. Then address the scheduling, blocking, and thread-state fidelity gaps, preserving virtual-time behavior or rejecting members where needed. Done when the members are controlled or rejected and no longer appear as unexplained holes in the generated inventory.

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

Mô tả

enhancement

The surface classification added for the built-in rules (every public and protected member of a targeted type is controlled, rejected, or listed with a reason in UnrewrittenMembers, rendered in docs/rule-inventory.md under Members left as BCL calls) lists these members as documented holes. Under a simulation each runs real BCL scheduling or blocks the physical thread that runs the coordinator, so it can escape the deterministic schedule or stall the simulation. Each needs a controlled shim or a rejection rule.

Schedules: work runs through a BCL scheduler, the thread pool, or a new thread

  • Task.Start(), Task.Start(TaskScheduler), Task.RunSynchronously(), Task.RunSynchronously(TaskScheduler) (a task built with an unrewritten Task/Task<T> constructor)
  • Parallel.ForAsync (3 overloads) and Parallel.ForEachAsync (6 overloads)
  • Thread.UnsafeStart(), Thread.UnsafeStart(object): on a controlled thread this starts the real OS thread with the recorded body
  • ThreadPool.BindHandle(IntPtr), ThreadPool.BindHandle(SafeHandle)

Blocks: blocks the calling physical thread

  • Task.Wait(int), Wait(CancellationToken), Wait(TimeSpan), Wait(int, CancellationToken), Wait(TimeSpan, CancellationToken)
  • Task.WaitAll(IEnumerable<Task>, CancellationToken), WaitAll(ReadOnlySpan<Task>), WaitAll(Task[], int), WaitAll(Task[], int, CancellationToken), WaitAll(Task[], CancellationToken), WaitAll(Task[], TimeSpan)
  • Task.WaitAny(Task[], int), WaitAny(Task[], int, CancellationToken), WaitAny(Task[], CancellationToken), WaitAny(Task[], TimeSpan)
  • SynchronizationContext.WaitHelper(IntPtr[], bool, int) (protected static)
  • ValueTask<T>.Result (already documented)

Fidelity

  • Thread.IsAlive and Thread.ThreadState read the BCL Thread object a controlled thread keeps as its identity, which never runs, so a started controlled thread reports itself unstarted (IdentityHandle).

The controlled Task.Wait(), WaitAll(Task[]), and WaitAny(Task[]) shims already pump the coordinator, so the timed and cancellable overloads could follow them with virtual deadlines; the scheduling members could follow Task.Run and ThreadPool.QueueUserWorkItem, or be rejected where the scheduler cannot be preserved (as ContinueWith rejects foreign schedulers). Moving a member from the list to a rule makes the classification test flag the stale UnrewrittenMembers entry.

Ngôn ngữ chính
C#
Star
0
Fork
0
Merge trung bình
2 giờ 32 phút
Pull request đã merge (30 ngày)
23

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 ReubenBond/Clockwork

Tất cả issue của ReubenBond/Clockwork

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.