“+[SomeClass initialize] may have been in progress in another thread when fork() was called”

来源:互联网 发布:qq邮箱for mac 编辑:程序博客网 时间:2024/06/04 23:35

python multiprocessing程序运行时,报错:

objc[2483]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.objc[2483]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

解决方法:添加环境变量:

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

附图:

这里写图片描述


参考:

  • http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
阅读全文
0 0
原创粉丝点击