phasync
Pool / release

Method

Pool::release

Gives a borrowed instance back, for the next borrower.

Description#

public Pool::release(
    object $instance
): void

Parameters#

$instance object
An instance from borrow()

Errors / Exceptions#

ExceptionWhen
LogicExceptionIf the pool did not lend it

See also#

  • Pool::discardGives a borrowed instance back as broken: the pool forgets it, passes it to $dispose, and makes a new one when needed.