title: how to map class and function in concurrent.futures.ProcessPoolExecute
body: <p>I have done a task of concurrent in Python, as the following code</p>
  
  <pre><code>def fun_x(a, b) :
      for x in range(10000) :
          x = x*x
              for y in range(10000) :
                  y = y*y
      return a*x, b*y
  
  
  with futures.ProcessPoolExecutor() as executor:
      futures_all_data = {executor.submit(fun_x,     # Function name
                                          number_a,   # args 1
                                          number_b,   # args 2
                                          ) : number_a 
                                          for number_a, number_b in arg }
  output_final = {}
  for future in futures.as_completed(futures_all_data, timeout = None) :
          result_Code, result_content = future.result()
          output_final[result_Code] = result_content
  
  return output_final
  </code></pre>
  
  <p>Currently, I need to use and class and a subfunction instead of funx, like,</p>
  
  <pre><code>def class_x(object):
      __init__(self, a):
          for x in range(10000):
              x = x*x
          a = a*x
      def fun_y(self, b) :
          for y in range(10000):
              y = y*y
          b = y*b + a
  </code></pre>
  
  <p>However, I am not sure how to deal with the executor.submit part?</p>
  
  <p>Could you give me some guidance?</p>
  
  <p>Thank you so much!</p>