In Python, is there any benefit of making a Thread and then join() over normal blocking process? For example, is this code:
def sleep():
time.sleep(5)
print "start..."
t = threading.Thread(target=sleep)
t.start()
t.join()
print "end..."
any better than this:
def sleep():
time.sleep(5)
print "start..."
sleep()
print "end..."
Is there any use-case or situation where one of it is better than the other?