<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def finish_parallel(self):
 """Orderly shutdown of workers."""

        for process in self.processes:
            process.join()

        # Shutdown the log thread
        log.debug('Joining log thread')
        self.log_queue.put(POISON_PILL)
        self.log_thread.join()
        self.log_queue.close()

        # Close all queues
        log.debug('Closing queues')
        self.task_queue.close()
        self.result_queue.close()