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

feat: Dispatch operations to internal queue #159

Merged
merged 1 commit into from
May 9, 2024

Conversation

crleona
Copy link
Collaborator

@crleona crleona commented May 3, 2024

Summary

Dispatch most public APIs and callbacks for timers and network calls to an internal queue to improve consistency. This also allows us to move work from the calling thread which is expected to be main for many view interactions.

This comes with 2 behavioral changes:

  • Any api call which generates an event no longer guarantees that the event would be recorded to disk when the call returns
  • setSessionId no longer immediately sets the sessionId, and subsequent calls to getSessionId may return the previous sessionId until this completes.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@crleona crleona requested review from izaaz, justin-fiedler and a team May 3, 2024 21:30
@crleona crleona force-pushed the AMP-99069-use-internal-queue branch 4 times, most recently from d2b4cce to c2ee62b Compare May 6, 2024 18:20
Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @crleona!

@crleona crleona force-pushed the AMP-99069-use-internal-queue branch 4 times, most recently from 1c996df to a18cc5a Compare May 7, 2024 21:04
@crleona crleona force-pushed the AMP-99069-use-internal-queue branch from a18cc5a to 014117c Compare May 8, 2024 19:42
@crleona crleona merged commit 83d24f7 into main May 9, 2024
3 checks passed
@crleona crleona deleted the AMP-99069-use-internal-queue branch May 9, 2024 01:40
github-actions bot pushed a commit that referenced this pull request May 10, 2024
# [1.5.0](v1.4.5...v1.5.0) (2024-05-10)

### Features

* Dispatch operations to internal queue ([#159](#159)) ([83d24f7](83d24f7))
* Fix retain cycles in Amplitude so instance will not leak memory ([#161](#161)) ([492d1fd](492d1fd))
Copy link

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants