| 576 | |
| 577 | |
| 578 | class InternalThreadCommandForAnyThread(InternalThreadCommand): |
| 579 | def __init__(self, thread_id, method=None, *args, **kwargs): |
| 580 | assert thread_id == "*" |
| 581 | |
| 582 | InternalThreadCommand.__init__(self, thread_id, method, *args, **kwargs) |
| 583 | |
| 584 | self.executed = False |
| 585 | self.lock = ForkSafeLock() |
| 586 | |
| 587 | def can_be_executed_by(self, thread_id): |
| 588 | return True # Can be executed by any thread. |
| 589 | |
| 590 | def do_it(self, dbg): |
| 591 | with self.lock: |
| 592 | if self.executed: |
| 593 | return |
| 594 | self.executed = True |
| 595 | |
| 596 | InternalThreadCommand.do_it(self, dbg) |
| 597 | |
| 598 | |
| 599 | def _send_io_message(py_db, s): |
no outgoing calls
no test coverage detected