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

Aperta
#50 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
0
Fork
0
Merge medio
2h 32m
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ReubenBond/Clockwork

Tutte le issue di ReubenBond/Clockwork

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.