MCPcopy
hub / github.com/mudler/LocalAI / Close

Method Close

core/services/syncstate/syncstate.go:133–142  ·  view source on GitHub ↗

Close unsubscribes and stops the reconcile ticker.

()

Source from the content-addressed store, hash-verified

131
132// Close unsubscribes and stops the reconcile ticker.
133func (m *SyncedMap[K, V]) Close() error {
134 if m.cancel != nil {
135 m.cancel()
136 }
137 m.wg.Wait()
138 if m.sub != nil {
139 return m.sub.Unsubscribe()
140 }
141 return nil
142}
143
144// Set updates the value locally, writes through the Store, then broadcasts.
145// Per the data-flow contract the Store write happens under the lock so memory and

Callers

nothing calls this directly

Calls 2

UnsubscribeMethod · 0.65
cancelMethod · 0.45

Tested by

no test coverage detected