aurelia / aurelia/task-queue

Flush during flush leads to not all tasks being executed

Aperta
#35 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
35
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**I'm submitting a bug report**

* **Library Version:**
current

**Please tell us about your environment:**
* **Operating System:**
OSX 10.x|Linux (distro)|Windows [7|8|8.1|10]

* **Node Version:**
6.2.0

* **NPM Version:**
3.8.9

* **Browser:**
all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView

* **Language:**
all | TypeScript X.X | ESNext

**Current behavior:**
If one of the queued micro tasks calls flushMicroTaskQueue
Queue enters the second flush cycle even though flushing is set to true
after which length of queue is set to zero
but for 1st flush call index is greater then length of queue at this point
and leads to unexpected behavior

**Expected/desired behavior:**

* **What is the expected behavior?**
If queue is already flushing we should ignore the second call

* **What is the motivation / use case for changing the behavior?**
prevent uncertainty

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando l’implementazione di flushMicroTaskQueue e riproduci un microtask accodato che chiami flushMicroTaskQueue mentre la coda è già in fase di svuotamento. Verifica che la chiamata annidata non interrompa il primo svuotamento e che tutti i task accodati vengano eseguiti.

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

Valutazione

Stack tecnologico
javascript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.