multi thread python psycopg2
问题 I'm using multi thread inside my program in python. I've got 3 queues. In one of them I'm inserting data to postgres database. But before, I need to check if in the database already exists row with specific domain name. So I've got: class AnotherThread(threading.Thread): def __init__(self, another_queue): threading.Thread.__init__(self) self.another_queue = another_queue def run(self): while True: chunk = self.another_queue.get() if chunk is not '': dane = chunk[0].split(',',2) cur.execute(