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

Removed semaphore.wait() and introduced a timer pause boolean. #19

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

Claeysson
Copy link
Contributor

Potential fix for app hang caused by flushSync() in aptabaseClient.swift.

Removed semaphore.wait() and added a variable to pause the timer execution if flush isn't done executing.

closes #18

@goenning
Copy link
Member

goenning commented Mar 1, 2024

In this case there flushSync is no longer synonymous because it doesn’t wait for it to complete, maybe we could test just calling “flush” instead of “flushAsync” when the app goes to background or is closed?

@cristipufu
Copy link
Member

I think we shouldn't block the app until the http call completes (unpredictable response time).

Maybe the sdk consumer can decide whether to call flush on applicationDidEnterBackground if needed (https://developers.google.com/analytics/devguides/collection/ios/v3/dispatch#override-applicationDidEnterBackground)

@cristipufu cristipufu merged commit d876770 into aptabase:main Jun 14, 2024
@cristipufu
Copy link
Member

We will document a solution for this

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.

Flush sync causes app to hang
3 participants