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