syncWith

open suspend fun syncWith(entityToSyncWith: ProcessModel.Entity, queue: HoldQueue, priority: Int = QUEUE_PRIORITY, resumePriority: Int = RESUME_PRIORITY, waitStats: Boolean = true, suspensionName: String? = null)

Causes the entity to be place itself in the hold queue if the entity to sync with is not within the hold queue. If the entity to sync with is in the hold queue, then the active entity will cause the held entity to resume at the curren time. This function facilitates a common use case between entities to allow them to sync in time.

Parameters

queue

a queue to hold the waiting entities

priority

a priority for the queue discipline if needed

resumePriority

the priority for the resumption of the suspended process

waitStats

if true the waiting time statistics are collected on the usage of the queue

suspensionName

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