Closed doridori closed 7 years ago
As PilotFrame.pushed() is a convenient place for a Frame to kick of any logic / processing, it should happen after the UI syncer callback takes place.
PilotFrame.pushed()
The current approach https://github.com/doridori/Pilot/blob/master/android/lib/app/src/main/java/com/kodroid/pilot/lib/stack/PilotStack.java#L102 is open to a racecondition. If we have a Frame perform a stack operation inside of pushed then with the current order, the UI syncer will receive these events in backwards order, as the second pushed frame will hit the notifyListenerVisibleFrameChange call first.
Frame
pushed
notifyListenerVisibleFrameChange
Released in 0.10.2_SNAPSHOT
As
PilotFrame.pushed()
is a convenient place for a Frame to kick of any logic / processing, it should happen after the UI syncer callback takes place.The current approach https://github.com/doridori/Pilot/blob/master/android/lib/app/src/main/java/com/kodroid/pilot/lib/stack/PilotStack.java#L102 is open to a racecondition. If we have a
Frame
perform a stack operation inside ofpushed
then with the current order, the UI syncer will receive these events in backwards order, as the second pushed frame will hit thenotifyListenerVisibleFrameChange
call first.