title: Properly Designing a Multiprocessing.Manager Custom Object
body: <p>I want to use the multiprocessing.Manager() object so I can asynchronously send information from a worker to the manager to send information to a server.  What I have is roughly 10 instances writing PDFs to disk.  I then wanted to use the manager object in the multiprocessing package to send that data to my S3 bucket because I do not want to hold up the local content generation.</p>
  
  <p>So I was wondering if I create a custom manager object, is this the proper way to do this? Will each process submitted to the manager object get queued? or if I call multiple uploads, will the manager drop some of the calls?</p>
  
  <p>Below is a sample code of what I am thinking of doing:</p>
  
  <pre><code>from multiprocessing.managers import BaseManager
  
  class UploadClass(object):
      def upload(self, filePath, params, destUrl):
          # do stuff
          return results
  
  class MyManager(BaseManager):
      pass
  
  MyManager.register('uploads', UploadClass)
  
  if __name__ == '__main__':
      manager = MyManager()
      manager.start()
      upload = manager.uploads()
      # do this wait for completion or do they perform this async
      print upload.upload(r"&lt; path &gt;", {...}, "some url")
      print upload.upload(r"&lt; path &gt;", {...}, "some url")
  </code></pre>