Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle timer shadows busy timers at rare cases #1115

Closed
d4vidi opened this issue Jan 13, 2019 · 1 comment
Closed

Idle timer shadows busy timers at rare cases #1115

d4vidi opened this issue Jan 13, 2019 · 1 comment

Comments

@d4vidi
Copy link
Collaborator

d4vidi commented Jan 13, 2019

Description

In ReactNativeTimersIdlingResource, "idle" timer can shadow the existence of a "busy" timer waiting in queue, causing isIdle() to falsely return true.

To be specific, this iteration tries to find the next timer, rather than the next busy timer. Thus, in the case where the next timer to pop happens to be a long one (duration > 1500ms), isIdle() would always return true -- even there's another timer waiting with a short duration whose target time happens to be past the 1st one's.

Steps to Reproduce

Pretty rare.

Detox, Node, Device, Xcode and macOS Versions

N/A

@d4vidi
Copy link
Collaborator Author

d4vidi commented Jan 14, 2019

Fixed in PR #1085

@d4vidi d4vidi closed this as completed Jan 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant