Initialize the ImagePool class Parameters: pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created
(self, pool_size)
| 10 | """ |
| 11 | |
| 12 | def __init__(self, pool_size): |
| 13 | """Initialize the ImagePool class |
| 14 | |
| 15 | Parameters: |
| 16 | pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created |
| 17 | """ |
| 18 | self.pool_size = pool_size |
| 19 | if self.pool_size > 0: # create an empty pool |
| 20 | self.num_imgs = 0 |
| 21 | self.images = [] |
| 22 | |
| 23 | def query(self, images): |
| 24 | """Return an image from the pool. |
nothing calls this directly
no outgoing calls
no test coverage detected