title: Get return value from a function in thread in Python
body: <p>I have written a Python function that uses multithreading.</p>
  
  <pre><code>def image(link_ID):
      tid1 = Thread(target=displayImage, args=(link_ID,))
      tid2 = Thread(target=publishIAmFree)
      tid1.start()
      tid2.start()
  </code></pre>
  
  <p>Function <code>displayImage()</code> simply puts up the image and the function <code>publishIAmFree()</code> publishes data to the broker and returns a <code>FLAG</code> value. </p>
  
  <p>How will I get the return value from the publishIAmFree() function, while in the thread?</p>