send

abstract suspend fun <T : ModelElement.QObject> send(item: T, blockingQ: BlockingQueue<T>, blockingPriority: Int = PRIORITY, suspensionName: String? = null)

This method will block (suspend) if the blocking queue is full. That is, if the blocking queue has reached its capacity. When space for the item becomes available, then the item is placed within the blocking queue.

Parameters

item

the item being placed into the blocking queue

blockingQ

the blocking queue channel that holds the items

blockingPriority

the priority for the entity that must wait to send if the blocking queue is full

suspensionName

the name of the possible suspension point. This can be used by the entity to determine which send blocking it might be experiencing when blocked. It is up to the client to ensure the name is meaningful and possibly unique.


open suspend fun <T : ModelElement.QObject> BlockingQueue<T>.send(item: T, blockingPriority: Int = PRIORITY, suspensionName: String? = null)

Permits simpler calling syntax when using a blocking queue within a KSLProcess This method will block (suspend) if the blocking queue is full. That is, if the blocking queue has reached its capacity. When space for the item becomes available, then the item is placed within the blocking queue.

Parameters

item

the item being placed into the blocking queue

blockingPriority

the priority for the entity that must wait to send if the blocking queue is full

suspensionName

the name of the possible suspension point. This can be used by the entity to determine which send blocking it might be experiencing when blocked. It is up to the client to ensure the name is meaningful and possibly unique.