def iterator(self, *types):
        queue = Queue()
        closed = []
        def messageGenerator(block=True, timeout=0.1):
            while True:
                try:
                    yield queue.get(block=block, timeout=timeout)
                except (Empty, ):
                    if closed:
                        break
        self.register(closed.append, 'ConnectionClosed')
        if types:
            self.register(queue.put, *types)
        else:
            self.registerAll(queue.put)
        return messageGenerator
tests delete_buildings for viewer role
dataset/ETHPy150Open CarterBain/Medici/ib/opt/dispatcher.py/Dispatcher.iterator--crossover with--dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/tests/test_delete.py/DeleteViewTests.test_delete_buildings_viewer