fix app crashing when reloads overlap
Summary:
Regarding the issue where the app sometimes crashes due to race condition when two reloads overlap in unfortunate way. This PR fixes it in some way by introducing throttling on reload command. For now I set it to 700ms as I was still able to reproduce it on 500-550ms for provided repro in the issue. The problem may still happen for bigger apps where reload may take more time to finish.
Changelog:
[GENERAL] [FIXED] - throttle reload command
Test Plan:
I've tested on provided repro and a smaller app trying to brake it.
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@coado Apologies for my wobble in reviewing this yesterday, see new reply comment 🙏🏻
@coado Apologies for my wobble in reviewing this yesterday, see new reply comment 🙏🏻
It's all good! I've changed it back to throttle 😁
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cipolleschi merged this pull request in facebook/react-native@42bad68220d288ef2436609ee50ad993c239b362.
This pull request was successfully merged by @coado in 42bad68220d288ef2436609ee50ad993c239b362
When will my fix make it into a release? | How to file a pick request?