<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def listener(self):
        '''Listen for pubsub messages relevant to this worker in a thread'''
        channels = ['ql:w:' + self.client.worker_name]
        listener = Listener(self.client.redis, channels)
        thread = threading.Thread(target=self.listen, args=(listener,))
        thread.start()
        try:
            yield
        finally:
            listener.unlisten()
            thread.join()