title: How to call a function on a running Python thread
body: <p>Say I have this class that spawns a thread:</p>
  
  <pre><code>import threading
  class SomeClass(threading.Thread):
      def __init__(self):
          threading.Thread.__init__(self)
  
      def run(self):
          while True:
              pass
  
      def doSomething(self):
          pass
  
      def doSomethingElse(self):
          pass
  </code></pre>
  
  <p>I want to</p>
  
  <pre><code>someClass = SomeClass()
  someClass.start()
  someClass.doSomething()
  someClass.doSomethingElse()
  someClass.doSomething()
  </code></pre>
  
  <p>How can I do this? I know I can call a function inside the <code>run()</code> function, but that's not what I am aiming for.</p>