close

open override fun close()

Closes the pool and the instances it holds. An instance still borrowed is closed when it is returned, and later borrows throw kotlinx.coroutines.channels.ClosedReceiveChannelException. Every instance the pool holds is closed even when closing one throws; the first failure then propagates, with the later ones attached as suppressed. An instance whose timed evaluation was abandoned is closed when that evaluation returns, if it ever does.