Напрмиер.
import threading, random, time, Queue
q = Queue.Queue()
def sum(a,b,q):
q.put(a+b)
def doSum():
while True:
a = random.uniform(4,5)
b = random.uniform(7,8)
t = threading.Thread(target=sum, args=(a,b,q)).start()
print q.get()
time.sleep(5)
doSum()