Skip to content

Add pause resume functionality #3

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

Merged
merged 26 commits into from
May 29, 2025
Merged

Conversation

Rentacookie
Copy link
Collaborator

@Rentacookie Rentacookie commented May 13, 2025

Exposed pause and resume methods on the Zongji listener that can be used suspend the listener when required. For the Powersync use case this is used to throttle events when the incoming rate of events is much higher than can be persisted. This prevents excessive memory usage whilst the backlog is cleared.

Additionally moved the type definitions for this package from the powersync service to here.

The stopt/start of the listener was modified slightly to provide better race condition handling for when the listener is stopped mid startup.

Added stopped check safeguards for pause and resume functions
@Rentacookie Rentacookie merged commit 941b166 into main May 29, 2025
3 checks passed
@Rentacookie Rentacookie deleted the add-pause-resume-functionality branch May 29, 2025 12:18
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.

2 participants