Todo: 集成多平台 解决因SaiNiu线程抢占资源问题 本地提交测试环境打包 和 正式打包脚本与正式环境打包bat 提交Python32环境包 改进多日志文件生成情况修改打包日志细节
This commit is contained in:
18
Utils/PythonNew32/Lib/test/mp_preload.py
Normal file
18
Utils/PythonNew32/Lib/test/mp_preload.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import multiprocessing
|
||||
|
||||
multiprocessing.Lock()
|
||||
|
||||
|
||||
def f():
|
||||
print("ok")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
ctx = multiprocessing.get_context("forkserver")
|
||||
modname = "test.mp_preload"
|
||||
# Make sure it's importable
|
||||
__import__(modname)
|
||||
ctx.set_forkserver_preload([modname])
|
||||
proc = ctx.Process(target=f)
|
||||
proc.start()
|
||||
proc.join()
|
||||
Reference in New Issue
Block a user