music2storage/worker.py
def run(self):
        """
        Method that gets run when the Worker thread is started.

        When there's an item in in_queue, it takes it out, passes it to func as an argument, and puts the result in out_queue.
        """
        
        while not self.stopper.is_set():
            try:
                item = self.in_queue.get(timeout=5)
            except queue.Empty:
                continue

            try:
                result = self.func(item)
            except TypeError:
                continue
            else:
                self.out_queue.put(result)
def run(self):
        """
        Method that gets run when the Worker thread is started.

        When there's an item in in_queue, it takes it out, passes it to func as an argument, and puts the result in out_queue.
        """
        
        while not self.stopper.is_set():
            try:
                item = self.in_queue.get(timeout=5)
            except queue.Empty:
                continue

            try:
                result = self.func(item)
            except TypeError:
                continue
            else:
                self.out_queue.put(result)
Method that gets run when the Worker thread is started.

        When there's an item in in_queue, it takes it out, passes it to func as an argument, and puts the result in out_queue.