'''
about what
'''
import multiprocessing
import time
def func(arg):
pname = multiprocessing.current_process().name
pid = multiprocessing.current_process().pid
print("当前进程ID=%d,name=%s" % (pid, pname))
for i in range(5):
print(arg)
time.sleep(1)
pass
if __name__ == "__main__":
pname = multiprocessing.current_process().name
pid = multiprocessing.current_process().pid
print("当前进程ID=%d,name=%s" % (pid, pname))
p = multiprocessing.Process(target=func, args=("hello",))
p.daemon = True
p.start()
while True:
print("子进程是否活着?", p.is_alive())
time.sleep(1)
pass
print("main over")