yield

abstract suspend fun yield(yieldPriority: Int = YIELD_PRIORITY, suspensionName: String? = null)

Causes the process to yield (suspend execution) at the current time, for zero time units, and return control back to the event executive. This permits other events scheduled for the current time to proceed due to the ordering of events.

Parameters

yieldPriority

, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time. Lower yield priorities go first.

suspensionName

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