Skip to content

Commit c2f6a50

Browse files
committed
Expose pollForUnitChangesAndWait on CheckedIndex
1 parent 2ed57a4 commit c2f6a50

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

@@ -128,6 +128,11 @@ public class CheckedIndex {
128128
public func fileHasInMemoryModifications(_ url: URL) -> Bool {
129129
return checker.fileHasInMemoryModifications(url)
130130
}
131+
132+
/// Wait for IndexStoreDB to be updated based on new unit files written to disk.
133+
public func pollForUnitChangesAndWait() {
134+
self.index.pollForUnitChangesAndWait()
135+
}
131136
}
132137

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

0 commit comments

Comments
 (0)