-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forCompletionOfAllTasksWithResults: exception 'Cannot set the result on a completed task.' #140
Comments
Hey @driver733, nothing seems suspicious from this code, though it's super helpful to have it. The safer method is |
Another piece of feedback about the code - you can get rid of |
Thanks! I have created a simple method for testing purposes (it raises the same exception)
Here`s the stack trace (if I am correctly understanding what you mean :) )
|
It's crazy hard to read a stack trace from Swift, it's all mangled... Two things that come to my mind:
|
You were 100% correct with your second guess. Thank you very much! |
Hello,
I am trying to implement the following logic:
However I get the exception:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot set the result on a completed task.'
The exception rises in this line: tempPost.timeSincePosted = self.getTimeSincePostedfromDate(post.createdAt!)
What does the setResult in the (self.getTimeSincePostedfromDate(post.createdAt!))
has to do with the main task?
The text was updated successfully, but these errors were encountered: