release

abstract fun release(allocation: Allocation, releasePriority: Int = RELEASE_PRIORITY)(source)

Releases the allocation of the resource

If the allocation was made to satisfy a request against a pool, the waiting requests in the queue name the pool rather than the member that happened to be allocated, so the release processes that queue on the pool's behalf. The allocation records which pool it came from, so this is automatic and the caller does not choose. Releasing a member allocation of a pool therefore still wakes the entities queued for that pool.

Parameters

allocation

represents an allocation of so many units of a resource to an entity

releasePriority

the priority associated with this release. This priority is used to order the resumption events associated with the release. If multiple releases occur at the same simulated time, this priority can be used to order the associated resumption of dependent processes.


abstract fun release(resource: Resource, releasePriority: Int = RELEASE_PRIORITY)(source)

Releases ANY(ALL) allocations related to the resource that are allocated to the entity currently executing this process

Parameters

resource

the resource to release

releasePriority

the priority associated with this release. This priority is used to order the resumption events associated with the release. If multiple releases occur at the same simulated time, this priority can be used to order the associated resumption of dependent processes.


abstract fun release(pooledAllocation: ResourcePoolAllocation, releasePriority: Int = RELEASE_PRIORITY)(source)

Releases the allocations associated with using a ResourcePool

Parameters

releasePriority

the priority associated with this release. This priority is used to order the resumption events associated with the release. If multiple releases occur at the same simulated time, this priority can be used to order the associated resumption of dependent processes.