-
Notifications
You must be signed in to change notification settings - Fork 172
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
Expose async transaction support in the C API #5783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to change the names. In the C++ Realm class we talk about transactions (begin_transaction
, cancel_transaction
), but in the C API we talk about writes (realm_begin_write
, realm_commit
, realm_rollback
). I suggest that for consistency's sake we use realm_async_begin_write
, realm_async_commit
, and realm_async_cancel
, or something else that follows the existing terminology in the C API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more questions from me.
@fealebenpae all your comments have been addressed, @nirinchev, if you think that passing the realm in the callback is superfluous, let me know, and I will remove the parameter. |
I'm just not sure why we'd need the realm instance in the callback. Supposedly, the caller already has an instance and they can capture that and use in the callback. It's possible I'm missing something though, so just wanted to check if that's the case. |
No, I think you are right, let me remove it. |
@nirinchev I am about to merge this, are you OK with the changes? |
What, How & Why?
Expose realm support for async transactions in the C API.
Fixes: #5771
☑️ ToDos