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

ISSUE-1765: Make suspend coroutine wrappers cancellable #1805

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IlyaPavlovskii
Copy link

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-ios and hybrids

Motivation

Stuck with the same problem mentioned in the issue 1765

Resolves #1765

Description

As it was mention in the description: when we cancel a coroutine using a job.cancel the suspendCoroutine doesn't cancel the revenueCat call.. but wrapping the normal non suspend function for get current customer in my own suspendCancellableCoroutine cancells the coroutine.

Checked on own integration - coroutines cancelled immediately after job.cancel() call, instead of prev solution, when await function might execute some code postponed, event it was cancelled

@JayShortway
Copy link
Member

Hi, thanks for taking the effort to raise this PR!

I replied in #1765. Let's discuss it there for now.

@IlyaPavlovskii IlyaPavlovskii force-pushed the bugfix-issue-1765/make-coroutine-wrappers-cancellable branch from 219893a to 3db0f22 Compare August 9, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible bug ?
2 participants