title: Python NotImplementedError: pool objects cannot be passed between processes
body: <p>I'm trying to deliver work when a page is appended to the pages list, but my code output returns a NotImplementedError. Here is the code with what I'm trying to do:</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>from multiprocessing import Pool, current_process
  import time
  import random
  import copy_reg
  import types
  import threading
  
  
  class PageControler(object):
      def __init__(self):
          self.nProcess = 3
          self.pages = [1,2,3,4,5,6,7,8,9,10]
          self.manageWork()
  
  
      def manageWork(self):
  
          self.pool = Pool(processes=self.nProcess)
  
          time.sleep(2)
          work_queue = threading.Thread(target=self.modifyQueue)
          work_queue.start()
  
          #pool.close()
          #pool.join()
  
      def deliverWork(self):    
          if self.pages != []:
              pag = self.pages.pop()
              self.pool.apply_async(self.myFun)
  
  
      def modifyQueue(self):
          t = time.time()
          while (time.time()-t) &lt; 10:
              time.sleep(1)
              self.pages.append(99)
              print self.pages
              self.deliverWork()
  
      def myFun(self):
          time.sleep(2)
  
  
  if __name__ == '__main__':
      def _pickle_method(m):
          if m.im_self is None:
              return getattr, (m.im_class, m.im_func.func_name)
          else:
              return getattr, (m.im_self, m.im_func.func_name)
  
      copy_reg.pickle(types.MethodType, _pickle_method)
  
      PageControler()
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>NotImplementedError: pool objects cannot be passed between processes or pickled
  </code></pre>
  
  <p>It's any way to pass the pool object between the processes ?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'm using Python 2.6 </p>