SetStatusCallback registers a progress callback for UI feedback. Pass nil to clear. Safe to call concurrently.
(cb StatusCallback)
| 153 | // SetStatusCallback registers a progress callback for UI feedback. |
| 154 | // Pass nil to clear. Safe to call concurrently. |
| 155 | func (hc *HistoryCompactor) SetStatusCallback(cb StatusCallback) { |
| 156 | hc.statusMu.Lock() |
| 157 | hc.onStatus = cb |
| 158 | hc.statusMu.Unlock() |
| 159 | } |
| 160 | |
| 161 | // emitStatus invokes the current status callback (if any). Never panics |
| 162 | // if the callback is nil or the caller has cleared it mid-flight. |
no test coverage detected