(self)
| 547 | executor._cancel_pending_futures = False |
| 548 | |
| 549 | def shutdown_workers(self): |
| 550 | n_children_to_stop = self.get_n_children_alive() |
| 551 | n_sentinels_sent = 0 |
| 552 | # Send the right number of sentinels, to make sure all children are |
| 553 | # properly terminated. |
| 554 | while (n_sentinels_sent < n_children_to_stop |
| 555 | and self.get_n_children_alive() > 0): |
| 556 | for i in range(n_children_to_stop - n_sentinels_sent): |
| 557 | try: |
| 558 | self.call_queue.put_nowait(None) |
| 559 | n_sentinels_sent += 1 |
| 560 | except queue.Full: |
| 561 | break |
| 562 | |
| 563 | def join_executor_internals(self): |
| 564 | with self.shutdown_lock: |
no test coverage detected