: def _queue_management_worker(executor_reference,                              processes,                              pending_work_items,                              work_ids_queue,                              call_queue,                              result_queue):     """Manages the communication between this process and the worker processes.         ...     """     executor = None      def shutting_down():         return _shutdown or executor is None or executor._shutdown_thread      def shutdown_worker():         ...      reader = result_queue._reader      while True:         _add_call_item_to_queue(pending_work_items,                                 work_ids_queue,                                 call_queue)          sentinels = [p.sentinel for p in processes.values()]         assert sentinels         ready = wait([reader] + sentinels)         if reader in ready:             result_item = reader.recv()         else:                               