Skip to content
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

Since adding [weak self] in Promise+Recover with version 2.0.4 the promise lose the reference #83

Closed
carmelogallo opened this issue Sep 22, 2020 · 3 comments
Labels
Milestone

Comments

@carmelogallo
Copy link

Hi @malcommac,

as the title, is that wanted?

@carmelogallo carmelogallo changed the title Since adding [weak self] in Promise+Resolve with version 2.0.4 the promise lose the reference Since adding [weak self] in Promise+Recover with version 2.0.4 the promise lose the reference Sep 23, 2020
@carmelogallo
Copy link
Author

carmelogallo commented Sep 23, 2020

Because if I do this now the promise is never going to be executed

func exec() -> Promise<MyOutput> {
    return Promise<MyOutput> { _, _, _, in 
         // my code
    }.Recover{ _ in 
        // my code
    }
}

myObject.exec.then(in: .main) { _ in 
    // my code
}

@tuliot
Copy link

tuliot commented Sep 26, 2020

I'm having trouble with this as well. The recover block does not run for me in version 1.2.2. However, reversing the changes applied in 69a9213 fix the issue for me

@carmelogallo
Copy link
Author

That's exactly what I did for now 😬

@malcommac malcommac added this to the 2.0.5 milestone Oct 8, 2020
@malcommac malcommac added the bug label Oct 8, 2020
malcommac added a commit that referenced this issue Oct 8, 2020
[#83] Removed weak self from recover operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants