-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
?
-
6429
-
Not Needed
Describe your problem or use case
We need a way to detach from core threads when closing the realm to allow the JVM to shut down. Current the core-notification system spawns a thread and we need to attach this to the JVM to send callbacks to Kotlin, but we have no way to detach the thread once the underlying thread is torn down.
Describe the solution you'd like
We would like a solution similar to the sync-thread notification done in https://github.com/realm/realm-core/issues/5966, but just for any thread that core creates that needs to issues calback to the SDK.
Might be that there is a more appropriate path through the realm_scheduler_t constructed with the CAPI's realm_scheduler_new and its realm_free_userdata_func_t-callback function, but currently I fail to see that this is actually called when realm is closed. Further, detaching through that would require it to be invoked on the notifier thread as that is the only option for detaching a thread from the JVM.
- related to
-
RCORE-1300 [C-API] Expose BindingCallbackThreadObserver so the JVM can correctly shut down
- Closed