错误提示:
objc[15314]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[15314]: +[__NSCFConstantString 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.
错误处理办法:
在函数的入口处:
if __name__ == '__main__':
import multiprocessing as mp
mp.set_start_method('spawn')
参考链接: https://github.com/microsoft/ptvsd/issues/943