requestConsent

open suspend override fun requestConsent(host: ConsentHost, showIfRequired: Boolean = true)(source)

Requests consent, sharing one UMP round trip between callers that ask at the same time, since overlapping requests drive the SDK into the failure path that crashes the process from its own executor. A host that is finishing or destroyed is rejected before UMP is called.

The flight is keyed on showIfRequired, so an explicit request for the form never takes the answer of one that shows it only when required. A caller joins only a request whose host is still alive. Incompatible requests wait for the active SDK operation before starting. A stale host is waited for at most STALE_REQUEST_WAIT_MS; a timeout fails the new caller and leaves the active operation tracked, so it cannot overlap another SDK request.