views:

72

answers:

0

hi..

got a test function, used by a worker process. the nextqueue has been set to have a size of 1, for a single element..

foo1 can be invoked mutiple times on the 1st time through, the queue gets set correctly all other times.. it appears that the function blacks/gets stuck on the put_nowait

the queue is created by importing the multiprocessing queue

as far as i can tell, the try/except block should be correct.. any thoughts/comments on what's wrong??

def foo1(nextqueue, c):
  nFunction="Campus"

  print " inside foo1 - c ="+str(c)+"\n"

  try:
    nextqueue.put_nowait(nFunction)
  except Queue.Full:
    print " inside foo1, queue is full : after queue- c ="+str(c)+"\n"

  print " inside foo1 : after queue- c ="+str(c)+"\n"
  return True

any thoughts/pointers/comments on what i might have missed would be useful...

like i said.. the 1st time through, the queue is set... every other time through, the function appears to get stuck/block...

oh.. this is using python 2.5, with the backported multiprocessing libs..

thanks