5 ms·
Android and iOS both use separate rendering processes/threads for UI and animation to eliminate a range of issues that would otherwise be observable. The code
by migueldeicaza 9y ago
Android and iOS both use separate rendering processes/threads for UI and animation to eliminate a range of issues that would otherwise be observable.
The code thread might hang, it scheduled rendering and animations will continue.
There are scenarios not covered by this hack, but largely these systems are responsible for masking many issues- in this case GC introduced pauses, but can happen in things as common as close()
- webkike 9y agoI would not call this a hack. A lot of systems are structured this way.
- romwell 9y agoIndeed, separating out UI, IO and process threads should be the prevailing design principle.
- yellowapple 9y agoAnd, in fact, is the definition of "view", "model" (kinda), and "controller", respectively.
- gok 9y agoA separate execution environment for animation can help, but usually not for cases where your GC'd code needs to change the rendering in response to user input. A good example which falls down often is scrolling.