You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is not thread-safe. There are two threads accessing the snowflake objects at the same time, the main thread in onDraw() and a background thread. This can cause the snowflakes to be drawn at incorrect positions.
You should really do everything on the main thread if possible, if not then you need to copy the array before passing it to the background thread then post it back to the main thread when the work is done so they don't interfere with each other.
The code is not thread-safe. There are two threads accessing the snowflake objects at the same time, the main thread in onDraw() and a background thread. This can cause the snowflakes to be drawn at incorrect positions.
You should really do everything on the main thread if possible, if not then you need to copy the array before passing it to the background thread then post it back to the main thread when the work is done so they don't interfere with each other.
[source]
The text was updated successfully, but these errors were encountered: