import Queue
import threading
import time
lock = threading.Lock()
def queue_test():
with lock:
time.sleep(100)
threading.Thread(target=queue_test).start()
exit()
aW1wb3J0IFF1ZXVlCmltcG9ydCB0aHJlYWRpbmcKaW1wb3J0IHRpbWUKCmxvY2sgPSB0aHJlYWRpbmcuTG9jaygpCgpkZWYgcXVldWVfdGVzdCgpOgogICAgd2l0aCBsb2NrOgogICAgICAgIHRpbWUuc2xlZXAoMTAwKQogICAgCnRocmVhZGluZy5UaHJlYWQodGFyZ2V0PXF1ZXVlX3Rlc3QpLnN0YXJ0KCkKZXhpdCgpCg==