(self: Pool<A, E>, item: PoolItem<A, E>)
| 878 | } |
| 879 | |
| 880 | const removeAvailable = <A, E>(self: Pool<A, E>, item: PoolItem<A, E>): void => { |
| 881 | if (!item.isAvailable) return |
| 882 | item.isAvailable = false |
| 883 | if (item.availablePrevious !== undefined) { |
| 884 | item.availablePrevious.availableNext = item.availableNext |
| 885 | } else { |
| 886 | self.state.availableHead = item.availableNext |
| 887 | } |
| 888 | if (item.availableNext !== undefined) { |
| 889 | item.availableNext.availablePrevious = item.availablePrevious |
| 890 | } else { |
| 891 | self.state.availableTail = item.availablePrevious |
| 892 | } |
| 893 | item.availablePrevious = undefined |
| 894 | item.availableNext = undefined |
| 895 | } |
| 896 | |
| 897 | /** |
| 898 | * Invalidates the specified item so the pool can remove it and reallocate the |
no outgoing calls
no test coverage detected