All the runScheduledAction complexity seems to be redundant
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- haskell
- Ambito
- distributed-systems
Direzione di ricerca
Inizia confrontando i commit referenziati 3855e91 e 876a3dc, quindi segui runScheduledAction e sendOn per comprendere le garanzie sull’ordine relative a MVar. Determina se la complessità della schedulazione è ridondante e documenta un ambito concreto e verificabile prima di modificarla.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Simply doing
thingToSend <- modifyMVar (....)
send thingToSendis not good enough, because now if we have to threads doing the above the sends
may be done in the wrong order.
Before https://github.com/haskell-distributed/network-transport-tcp/commit/876a3dc94e516c9ec60ea8b0a65ea3f13b8c1f27 it was true. But after sendOn was protected with MVar it seems that it became redundant, because, as @simonmar states in his book:
if a thread T is blocked in takeMVar and there are regular putMVar operations on the same MVar, it is guaranteed that at some point thread T’s takeMVar will return. In GHC, this guarantee is implemented by keeping blocked threads in a FIFO queue attached to the MVar...
In other words, the first thread called sendOn and blocked on MVar will be served first when the MVar will be available (if I understood correctly the book). So it seems that "simply doing" approach mentioned in the beginning will just do. No?
CC @edsko
- Lingua principale
- Haskell
- Stelle
- 753
- Fork
- 101
- Merge medio
- 1g 3h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di haskell-distributed/distributed-process
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
enhancement Feature Request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
haskell-distributed/distributed-process#486 · 1 commento · 1 reazione ·
-
discuss enhancement Feature Request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
haskell-distributed/distributed-process#478 · 4 commenti · 3 reazioni ·
-
enhancement Feature Request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
haskell-distributed/distributed-process#476 · 2 reazioni ·
-
Demonstrating the use of Cloud Haskell for a Raft implementationForse di nuovo libera @LaurentRDC l’ha presa 481 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement Feature Request
haskell-distributed/distributed-process#475 · 3 reazioni · 1 assegnatario ·
Tutte le issue di haskell-distributed/distributed-process
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
objectionary/phino#2059 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NixOS/nixpkgs-update#586 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
koalaman/shellcheck#3593 ·
-
Make node sockets moduleApertaconfiguration
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
tweag/cardano-kosmos#47 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 3 giorni