Fast async actions fired from .run
result in actions on nil state during dismissal
#1767
-
In an application that runs an async timer in a dismissable "SheetScene" as follows:
where the
Dismissing this SheetScene (which is both running the timer and asynchronously receiving the timer events) results in a cancellation of the timer (as expected because of the There is a full app demonstrating this at [link to TCAQuestion0002 removed, outdated] (make sure you're on the TCAQuestion0002 branch for this, which should be the default). To see the issue in the app, click "Show Sheet" to navigate to the SheetScene, let the timer run for a moment, then click "Dismiss" How can this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Would some form of debouncing help here? |
Beta Was this translation helpful? Give feedback.
-
@wilsonmhpn We have plans to suppress these kinds of warnings in the future, but for now we think it's safe to ignore them, and they shouldn't affect release builds of your application. They merely try to point out when the store is unable to process those final actions, which it sounds like is OK in this case? |
Beta Was this translation helpful? Give feedback.
@wilsonmhpn We have plans to suppress these kinds of warnings in the future, but for now we think it's safe to ignore them, and they shouldn't affect release builds of your application. They merely try to point out when the store is unable to process those final actions, which it sounds like is OK in this case?