title: queue function for Multiprocess Priority Queue in python with SyncManager class
body: <p>I wanted to implement multiprocessing priorityqueue .
  I found this answer :- <a href="https://stackoverflow.com/questions/25324560/strange-queue-priorityqueue-behaviour-with-multiprocessing-in-python-2-7-6">Strange Queue.PriorityQueue behaviour with multiprocessing in Python 2.7.6</a> </p>
  
  <p>by <a href="https://stackoverflow.com/users/2073595/dano">Dano</a></p>
  
  <p>After I implemented this . I could use .get() and .put() function for my Priority Queue but when i used .queue to print the current elements in the queue it gave me an error </p>
  
  <p>code:- </p>
  
  <pre><code> class MyManager(SyncManager):   
      pass
  
  def get_manager():
      MyManager.register("PriorityQueue", PriorityQueue)  # Register a shared PriorityQueue
      m = MyManager()
      m.start()
      return m
  
  m = get_manager()
  call= m.PriorityQueue()
  for i in range(5):
      call.put(i)
  
  print(call.queue)
  </code></pre>
  
  <p>Error : <code>AttributeError: 'AutoProxy[PriorityQueue]' object has no attribute 'queue'</code></p>
  
  <p>I read the python documentation for SyncManager and modified my code .</p>
  
  <p>New code :-</p>
  
  <pre><code>class MyManager(SyncManager):   
      pass
  
  def get_manager():
      MyManager.register("PriorityQueue", PriorityQueue,exposed=['put','get','queue'])  # Register a shared PriorityQueue
      m = MyManager()
      m.start()
      return m
  
  m = get_manager()
  call= m.PriorityQueue()
  for i in range(5):
      call.put(i)
  
  print(call.queue)
  </code></pre>
  
  <p>Now output was :- </p>
  
  <pre><code>&lt;bound method AutoProxy[PriorityQueue].queue of &lt;AutoProxy[PriorityQueue] object, typeid 'PriorityQueue' at 0x7ff3b48f2dd0&gt;&gt;
  </code></pre>
  
  <p>I am still not getting the elements in the queue , i read about <code>method_to_typeid</code> attribute of register function to map the return type of functions mentioned in <code>exposed</code>  , but i don't know how use that . </p>
  
  <p>Can someone help me with this , so that i could print elements of the queue without poping them from queue</p>