title: How to use multi-processing in class?
body: <p>I want to use use multiprocessing to do the following:</p>
  
  <pre><code>class myClass:
  
      def proc(self):
          #processing random numbers
          return a
  
      def gen_data(self):
          with Pool(cpu_count()) as q:
              data = q.map(self.proc, [_ for i in range(cpu_count())])#What is the correct approach?
          return data
  </code></pre>