blockUntilCompleted

abstract suspend fun blockUntilCompleted(process: KSLProcess, resumptionPriority: Int = RESUME_PRIORITY, suspensionName: String? = null)

Causes the current process to block until the specified process completes. This function does not activate the specified process. The specified process must have been previously activated. If the specified process has already completed, then no blocking occurs. In other words, the call immediately returns. If the specified process has terminated, then an exception occurs.

Parameters

process

the process to block for. The supplied process must not be terminated and cannot be the same as the current process.

resumptionPriority

a priority indicator to inform ordering when there is more than one process blocking for the specified process

suspensionName

the name of the blockUntilCompletion. can be used to identify which blockUntilCompletion the entity is experiencing if there are more than one blockUntilCompletion suspension points within the process. The user is responsible for uniqueness.