title: Python Multiprocessing: Running from Inside Class Inherited from PyQT
body: <p>Starting from where a following thread concluded <a href="https://stackoverflow.com/questions/1816958/cant-pickle-type-instancemethod-when-using-pythons-multiprocessing-pool-ma">Can't pickle type instancemethod</a> that discussed a similar issue. </p>
  
  <p>Here is an example code (taken from that post(simplified) that does solve a problem of using multipocessing from inside of class:</p>
  
  <pre><code>from multiprocessing import Pool, cpu_count 
  from multiprocessing.pool import ApplyResult
  
  class Myclass(object):    
      def __init__(self):    
          pool = Pool(processes=3)    
          async_results = [ pool.apply_async(self, (i,)) for i in range(8) ]    
          pool.close()    
          map(ApplyResult.wait, async_results)   
  
      def __call__(self, i):
          self.process_obj(i)
  
      def __del__(self):
          print "... Destructor"
  
      def process_obj(self, i):
          print "obj %d" % i
          return "result"
  
  Myclass()
  </code></pre>
  
  <h3>Next trying a same code except this time Myclass() is inheriting from QtGui.QMainWindow:</h3>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  
  from multiprocessing import Pool, cpu_count
  from multiprocessing.pool import ApplyResult
  
  
  app = QtGui.QApplication(sys.argv)
  
  class Myclass(QtGui.QMainWindow):
      def __init__(self):
          super(Myclass, self).__init__()
          pool = Pool(processes=3)
          async_results = [ pool.apply_async(self, (i,)) for i in range(8) ]
          pool.close()
          map(ApplyResult.wait, async_results)
  
      def __call__(self, i):
          self.process_obj(i)
  
      def __del__(self):
          print "... Destructor"
  
      def process_obj(self, i):
          print "obj %d" % i
          return "result"
  
  Myclass()
  </code></pre>
  
  <h3>Running it results to <strong>RuntimeError</strong>:</h3>
  
  <pre><code> RuntimeError: super-class __init__() of type Myclass was never called
  </code></pre>
  
  <h2>Would would be a possible solution?</h2>