Skip to content

Commit 932f92c

Browse files
committed
Expose pollForUnitChangesAndWait on CheckedIndex
1 parent 1f87e7f commit 932f92c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/SemanticIndex/CheckedIndex.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public enum IndexCheckLevel {
4747
/// `IndexCheckLevel`.
4848
///
4949
/// - SeeAlso: Comment on `IndexOutOfDateChecker`
50-
public class CheckedIndex {
50+
public final class CheckedIndex: Sendable {
5151
private var checker: IndexOutOfDateChecker
5252
private let index: IndexStoreDB
5353

@@ -135,6 +135,11 @@ public class CheckedIndex {
135135
public func fileHasInMemoryModifications(_ url: URL) -> Bool {
136136
return checker.fileHasInMemoryModifications(url)
137137
}
138+
139+
/// Wait for IndexStoreDB to be updated based on new unit files written to disk.
140+
public func pollForUnitChangesAndWait() {
141+
self.index.pollForUnitChangesAndWait()
142+
}
138143
}
139144

140145
/// A wrapper around `IndexStoreDB` that allows the retrieval of a `CheckedIndex` with a specified check level or the

0 commit comments

Comments
 (0)