cancel

fun cancel()

Asks the build to stop at the next segment boundary.

Returns immediately; use await to wait for it. Idempotent, and safe to call on a build that has already finished — a build that completed a microsecond earlier stays IndexBuildState.COMPLETED rather than being retroactively cancelled, because what it did is what it did.