| 656 | self.event = threading.Event() |
| 657 | |
| 658 | class Processor(object): |
| 659 | def __init__(self, queue): |
| 660 | self._queue = queue |
| 661 | |
| 662 | def process(self, i): |
| 663 | obj = NotificationObject(i) |
| 664 | self._queue.put(obj) |
| 665 | assert obj.event.wait() |
| 666 | |
| 667 | def finish(self): |
| 668 | self._queue.put("finish") |
| 669 | |
| 670 | if __name__ == "__main__": |
| 671 | q = queue.Queue() |
no outgoing calls
searching dependent graphs…