-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FAQ addition: can you explain joint & join #688
Comments
The join resolves the promise. |
Why would I use join instead of just fulfill? Can you show an example? I've also been looking for docs re: dangers/best practices for saving a pending promise in an instance variable. I have a Social login SDK that opens the Facebook App & asks the user to authenticate, and then returns the results to my AppDelegate external URL handler. It's after that callback from the URL handler that I want to either fulfill or reject my stored promise.. |
Joint exists to replace: let (foo, fulfill, reject) = Promise.pending()
promise.then(fulfill).catch(reject)
// with
let (foo, joint) = Promise.joint()
promise.join(joint) So for your situation you probably want just I'm not improving the docs on Joint as it was an experimental feature we intend to remove due to insufficient value and we have a different way to do it for PMK5. |
sure....if it's going away, I don't need to understand it.... this teaches me something....so you can pass the completion functions any place another promise is expected..... |
PromiseKit 5 abandons this construct. |
I'd like to understand what they represent and how they work....
I read the reference material but that only show's how to call them...not what they actually do...
The text was updated successfully, but these errors were encountered: