Python多进程创建Manager()对象时,为啥报OSError: [Errno 5] Input/output error?

我用Python的multiprocess实现多进程任务处理,其中用到了Manager对象以实现父子进程间的通信。创建这个Manager对象的语句是在一个循环当中,循环第一次没什么问题,但后面第二次或者第n次的时候就会报标题中的错误,具体错误栈信息如下所示,望高人指点!

Traceback (most recent call last):
File "btt_tick_main.py", line 252, in btt_main
btt_date(begin_fmt, task_q_list, return_q)
File "btt_tick_main.py", line 43, in _btt_date
amAlternativeMain.alternative_before_trading(date)
File "/data/source/qtdata_btt/script/qtdata/actualtrade/alternative/amAlternativeMain.py", line 83, in alternative_before_trading
choosed_codes = strategy.screen_day_condition(real_trading_date)
File "/data/source/qtdata_btt/script/qtdata/actualtrade/strategy/extends/st_c_zeg/st_c_zeg.py", line 31, in screen_day_condition
return fix_alternative2(date, self.get_id(), self._strategyManager)
File "/data/source/qtdata_btt/script/qtdata/actualtrade/strategy/extends/st_c_zeg/c_zeg_alternative_logic.py", line 98, in fix_alternative2
manager = Manager()
File "/opt/quant/anaconda3/lib/python3.6/multiprocessing/context.py", line 56, in Manager
m.start()
File "/opt/quant/anaconda3/lib/python3.6/multiprocessing/managers.py", line 513, in start
self._process.start()
File "/opt/quant/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/opt/quant/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/opt/quant/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 18, in __init
_
sys.stderr.flush()
OSError: [Errno 5] Input/output error

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐