Flush during flush leads to not all tasks being executed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by locating the flushMicroTaskQueue implementation and reproduce a queued microtask that calls flushMicroTaskQueue while the queue is already flushing. Confirm that the nested call does not disrupt the first flush and that all queued tasks execute.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 35
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·