Synchronous channel cleanup

Aperta
#3,064 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
haskell

Direzione di ricerca

Start by reading the channel shutdown and stream worker code to find where ThreadAbort is sent; the issue does not name specific files or tests. Compare synchronous cancellation, asynchronous abort, and the proposed timeout based hybrid, then identify the behavior and configuration that should be tested. Done means the chosen shutdown mode is implemented and its effect on the current stream action and pending items is verified.

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

Descrizione

We throw ThreadAbort exception to running thread when the channel is stopped. Asynchronous exceptions can cause inadvertent problems because of unclean shutdown of the thread. It may leave the system in inconsistent state unless proper exception handling is implemented by the programmer. To avoid such issues we can also use a synchronous shutdown of streams by setting a flag and letting the thread abort itself. This would stop the thread before the next item in the stream is handled but the current action would not be interrupted. This could lead to delays in aborting the streams but would be safer than async signalling. This could be a config option, perhaps the default and the programmer can choose the other way if needed.

We can also have an option of a hybrid approach where we try to stop the threads synchronously first then after a timeout throw async exceptions.

Lingua principale
Haskell
Stelle
926
Fork
71
Merge medio
6h 49m
PR unite (30g)
3

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 composewell/streamly

Tutte le issue di composewell/streamly

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.