import threading
import time

def a():
    th = threading.Thread(target=b)
    th.start()
    print('end a')

def b():
    time.sleep(2)
    print('end b')

a()
time.sleep(4)
print('end main')
