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
From what I can tell removeTask can be called by another task completion prior to the previous one being finished (if they finish at or near the same time) and therefore the NSUserDefaults isn't stored correctly and the task isn't removed from the NSUserDefaults - thus on subsequent launches it will try to complete a task already completed.
Am I doing something wrong or this indeed a race condition? I'm not sure what the best solution is to ensure that removeTask finishes before being called again to ensure the NSUserDefaults is removed correctly.
The text was updated successfully, but these errors were encountered:
From what I can tell removeTask can be called by another task completion prior to the previous one being finished (if they finish at or near the same time) and therefore the NSUserDefaults isn't stored correctly and the task isn't removed from the NSUserDefaults - thus on subsequent launches it will try to complete a task already completed.
Am I doing something wrong or this indeed a race condition? I'm not sure what the best solution is to ensure that removeTask finishes before being called again to ensure the NSUserDefaults is removed correctly.
The text was updated successfully, but these errors were encountered: