Skip to content

add sync to close, disconnect, and flush #186

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 1 commit into from
Mar 23, 2025

Conversation

jraymakers
Copy link
Contributor

  • Add Sync suffix to close, disconnect, and flush methods that can perform significant work:
    • instance.close -> instance.closeSync
    • connection.close -> connection.closeSync
    • connection.disconnect -> connection.disconnectSync
    • appender.flush -> appender.flushSync
    • appender.close -> appender.closeSync
  • Add _sync suffix to corresponding bindings functions:
    • close -> close_sync
    • disconnect -> disconnect_sync
    • appender_flush -> appender_flush_sync
    • appender_close -> appender_close_sync

The implementation of these functions is unchanged.

In the future, I plan to add async versions of all of these, using the name without the Sync or _sync suffix. Releasing this name change separately from adding the async versions hopefully make migration easier, because the name change will be detected by the compiler, while changing a function from sync to async is harder to detect.

@jraymakers jraymakers merged commit 622aa32 into main Mar 23, 2025
5 checks passed
@jraymakers jraymakers deleted the jray/add-sync-to-close-disconnect-flush branch March 23, 2025 19:25
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.

1 participant