Skip to content

Commit 1728da2

Browse files
committed
Improve documentation for pollForUnitChangesAndWait
1 parent 5fb240e commit 1728da2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/IndexStoreDB/IndexStoreDB.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ public final class IndexStoreDB {
146146
indexstoredb_release(impl)
147147
}
148148

149-
/// *For Testing* Poll for any changes to units and wait until they have been registered.
149+
/// Poll for any changes to units and wait until they have been registered.
150+
///
151+
/// This scans through all unit files on the file system and is thus a fairly costly operation. It should primarily
152+
/// be used for testing or in situations where having an up-to-date indexstore-db can avoid significant other work,
153+
/// such as if the indexstore-db is used to decide whether files need to be re-indexed.
150154
public func pollForUnitChangesAndWait(isInitialScan: Bool = false) {
151155
indexstoredb_index_poll_for_unit_changes_and_wait(impl, isInitialScan)
152156
}

0 commit comments

Comments
 (0)