(self)
| 126 | self.daemon = True |
| 127 | |
| 128 | def run(self): |
| 129 | try: |
| 130 | while True: |
| 131 | dp = self.queue_get_stoppable(self.inq) |
| 132 | if self.stopped(): |
| 133 | return |
| 134 | # cannot ignore None here. will lead to unsynced send/recv |
| 135 | obj = self.func(dp) |
| 136 | self.queue_put_stoppable(self.outq, obj) |
| 137 | except Exception: |
| 138 | if self.stopped(): |
| 139 | pass # skip duplicated error messages |
| 140 | else: |
| 141 | raise |
| 142 | finally: |
| 143 | self.stop() |
| 144 | |
| 145 | def __init__(self, ds, num_thread=None, map_func=None, *, buffer_size=200, strict=False): |
| 146 | """ |
nothing calls this directly
no test coverage detected