-
Notifications
You must be signed in to change notification settings - Fork 158
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
Implement RefreshAsync in native #2995
Conversation
|
||
try | ||
{ | ||
var didRegister = NativeMethods.refresh_async(this, GCHandle.ToIntPtr(tcsHandle), out var ex); |
Check notice
Code scanning / CodeQL
Calls to unmanaged code
[DllImport(InteropConfig.DLL_NAME, EntryPoint = "shared_realm_get_subscriptions_version", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern Int64 get_subscriptions_version(SharedRealmHandle realm, out NativeException ex); | ||
|
||
[DllImport(InteropConfig.DLL_NAME, EntryPoint = "shared_realm_refresh_async", CallingConvention = CallingConvention.Cdecl)] | ||
public static extern bool refresh_async(SharedRealmHandle realm, IntPtr tcs_handle, out NativeException ex); |
Check notice
Code scanning / CodeQL
Unmanaged code
ae1b4ce
to
6f286c6
Compare
Pull Request Test Coverage Report for Build 2871119489
💛 - Coveralls |
{ | ||
HandleTaskCompletion(tcs_ptr, () => (object)true, ex); | ||
}, null); | ||
// The task awaiting on this tcs should only continue once the native method Realm::run_writes has finished to run. |
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.
Generalize this comment a little
} | ||
|
||
private: | ||
std::map<uint64_t, std::pair<uint64_t, void*>> m_tcs; |
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.
std::map<uint64_t, std::pair<uint64_t, void*>> m_tcs; | |
std::map<uint64_t, std::pair<DB::version_type, void*>> m_tcs; |
Description
Related to realm/realm-core#5246
TODO