MCPcopy Create free account
hub / github.com/bwt-dev/bwt / sync_background

Method sync_background

src/app.rs:211–215  ·  view source on GitHub ↗

Start a sync loop in a new background thread. Takes ownership over the app. You can retain a Query instance before calling this.

(self)

Source from the content-addressed store, hash-verified

209 /// Start a sync loop in a new background thread.
210 /// Takes ownership over the app. You can retain a Query instance before calling this.
211 pub fn sync_background(self) -> mpsc::SyncSender<()> {
212 let (shutdown_tx, shutdown_rx) = mpsc::sync_channel(1);
213 thread::spawn(move || self.sync_loop(Some(shutdown_rx)));
214 shutdown_tx
215 }
216
217 /// Get the sender for triggering a real-time index sync
218 pub fn sync_sender(&self) -> mpsc::Sender<()> {

Callers 1

mainFunction · 0.80

Calls 2

spawnFunction · 0.85
sync_loopMethod · 0.80

Tested by

no test coverage detected