* Destroy a resource from the pool * @param resource - Resource instance to be destroyed
(resource: T)
| 243 | * @param resource - Resource instance to be destroyed |
| 244 | */ |
| 245 | async destroy(resource: T) { |
| 246 | debug( |
| 247 | 'Destroying a resource from the pool in context %s', |
| 248 | this.context.name, |
| 249 | resource, |
| 250 | ); |
| 251 | await this.pool.destroy(resource); |
| 252 | debug('Resource destroyed in context %s', this.context.name, resource); |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Run the task with an acquired resource from the pool. If task is completed |