Close worker pool
(self)
| 192 | self.task_queues[i].put((MpCommand.CALL_BARRIER, tuple())) |
| 193 | |
| 194 | def close(self): |
| 195 | """Close worker pool""" |
| 196 | for i in range(self.num_workers): |
| 197 | self.task_queues[i].put( |
| 198 | (MpCommand.FINALIZE_POOL, tuple()), block=False |
| 199 | ) |
| 200 | time.sleep(0.5) # Fix for early python version |
| 201 | |
| 202 | def join(self): |
| 203 | """Join the close process of worker pool""" |
no outgoing calls
no test coverage detected