您的位置:首页 > 编程语言 > Python开发

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

2017-12-07 17:26 585 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python 多进程 fork
相关文章推荐