title: Run Class methods in threads (python)
body: <p>I'm currently learning Python and Classes and I have a basic question, but I didn't find any answer to it. Let's say I have this dummy class</p>
  
  <pre><code>class DomainOperations:
      def __init__(self, domain):
          self.domain = domain
          self.domain_ip = ''
          self.website_thumbnail = ''
  
      def resolve_domain(self):
          #resolve domain to ipv4 and save to self.domain_ip
  
      def generate_website_thumbnail(self):
          #generate website thumbnail and save the url to self.website_thumbnail
  </code></pre>
  
  <p>I want to run simultaneously resolve_domain and generate_website_thumbnail and when the threads are finished I want to print the IP and the thumbnail. </p>
  
  <p><strong>EDIT:</strong> I know I should use threads, maybe something like this</p>
  
  <pre><code>r = DomainOperations('google.com')
  
  t1 = threading.Thread(target=r.resolve_domain)
  t1.start()
  
  t2 = threading.Thread(target=r.generate_website_thumbnail)
  t2.start()
  </code></pre>
  
  <p>But should I use them outside the Class? Should I write another Class to handle Threads?</p>
  
  <p>What is the <strong>right way</strong> to do that?</p>