import threading
# event.wait()##阻断线程向下执行 event_obj.set()#释放进程向下执行
def do(event):
    print('start')
    event.wait()##阻断线程向下执行
    print('execute')

event_obj = threading.Event()
for i in range(10):
    t = threading.Thread(target=do, args=(event_obj,))
    t.start()
event_obj.clear()
inp = 0
for _ in range(100):
    print(inp)
    inp += 1
while True:
    if inp == 99:
        event_obj.set()#释放线程向下执行
        break

b310a2c94081642fada660800d97bb15c1c3f5f4
<mask token>

<mask token>


def do(event):
    print('start')
    event.wait()
    print('execute')


<mask token>
for i in range(10):
    t = threading.Thread(target=do, args=(event_obj,))
    t.start()
event_obj.clear()
<mask token>
for _ in range(100):
    print(inp)
    inp += 1
while True:
    if inp == 99:
        event_obj.set()
        break

<mask token>


def do(event):
    print('start')
    event.wait()
    print('execute')


event_obj = threading.Event()
for i in range(10):
    t = threading.Thread(target=do, args=(event_obj,))
    t.start()
event_obj.clear()
inp = 0
for _ in range(100):
    print(inp)
    inp += 1
while True:
    if inp == 99:
        event_obj.set()
        break

import threading


def do(event):
    print('start')
    event.wait()
    print('execute')


event_obj = threading.Event()
for i in range(10):
    t = threading.Thread(target=do, args=(event_obj,))
    t.start()
event_obj.clear()
inp = 0
for _ in range(100):
    print(inp)
    inp += 1
while True:
    if inp == 99:
        event_obj.set()
        break

import threading
# event.wait()##阻断线程向下执行 event_obj.set()#释放进程向下执行
def do(event):
    print('start')
    event.wait()##阻断线程向下执行
    print('execute')

event_obj = threading.Event()
for i in range(10):
    t = threading.Thread(target=do, args=(event_obj,))
    t.start()
event_obj.clear()
inp = 0
for _ in range(100):
    print(inp)
    inp += 1
while True:
    if inp == 99:
        event_obj.set()#释放线程向下执行
        break
