2

I am currently trying to create a queue that would be shared between processes, however I am getting an error as said in the title [Errno 11] Resource temporarily unavailable. However I am not sure what is going on, I have tried to implement a retry on it to see if it would resolve the problem however it did not.

OutputQ = None
WorkersPerCPU = 1
pool_size = mp.cpu_count() * WorkersPerCPU
pool = mp.Pool(processes=pool_size)
manager = mp.Manager()
while not OutputQ:
    try:
        OutputQ = manager.Queue()
    except:
        pass
    finally:
        print "retrying..."
        time.sleep(2)
pool.apply_async(KeepAlive, (a, b, OutputQ))

The exception fires when I try to allocate a queue.

Johnathon64
  • 1,280
  • 1
  • 20
  • 45

0 Answers0