feat(qconnect): own remote-sync Mutex on QconnectApp via new(transport, sink, sync) + sync_handle (slice 2+4)
QconnectApp now holds the shared QconnectRemoteSyncState accumulator behind its own Mutex, disjoint from `state` (the two are never co-locked). The Tauri adapter still builds the Arc and passes the SAME clone to its event sink / service loop and into new(), so there is exactly one lock backing the session/liveness/renderer paths -- the app simply gains a handle to it via sync_handle(). Pure wiring, byte-identical locking, no logic moved. Prepares slices 2+4.4/5 to relocate the session-apply + watchdog logic into qconnect-app. cc
This commit is contained in:
2 files changed
+43
-4
No files matched your search
@@ -304,7 +304,11 @@ impl QconnectServiceState {
|
||||
sync_state: Arc::clone(&sync_state),
|
||||
app: Arc::new(std::sync::OnceLock::new()),
|
||||
});
|
||||
let app = Arc::new(QconnectApp::new(transport, Arc::clone(&sink)));
|
||||
let app = Arc::new(QconnectApp::new(
|
||||
transport,
|
||||
Arc::clone(&sink),
|
||||
Arc::clone(&sync_state),
|
||||
));
|
||||
// P1-6: wire the owning app into the sink so it can emit reports
|
||||
// (e.g. is_active=true after SetActive(true)).
|
||||
sink.set_app(&app);
|
||||
|
||||
Reference in new issue
Block a user