

def request_and_wait(self):
    request_id = ('%s::%s' % (threading.current_thread().getName(), random.random()))
    with self.pending_elements_condition:
        self.pending_elements.append(request_id)
    self.queue.put_nowait(request_id)
    with self.pending_elements_condition:
        while ((request_id in self.pending_elements) and self.isAlive()):
            self.pending_elements_condition.wait(timeout=5)

dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/coordinator/scheduler_transactions_synchronizer.py SchedulerTransactionsSynchronizer.request_and_wait/original