Support providing AbortSignal to the `fs.stat` functions
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
What is the problem this feature will solve?
Currently fs.stat does not support providing an AbortSignal to fail-fast during teardown, unlike basically all other fs operations
What is the feature you are proposing to solve the problem?
That the StatOptions object have a new field signal?: AbortSignal and when that signal emits an "abort" event the underlying OS FS actions is aborted an the callback parameter of stat is called with an AbortError and undefined.
Futhermore, the async version of stat would also support this option but instead would reject the promise with an AbortError.
What alternatives have you considered?
None, this needs to be implemented within the VM
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando i punti di ingresso di fs.stat e StatOptions, quindi confronta il modo in cui le operazioni fs esistenti accettano AbortSignal e propagano AbortError. Il lavoro è completato quando stat basato su callback restituisce AbortError e undefined dopo un’interruzione, mentre la versione basata su promise viene rifiutata con AbortError e l’azione sottostante del filesystem si arresta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend-api-design, operating-systems
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100