0
当我使用并行python传递任何信号量对象或同步对象(如事件,管道,队列等等)到子进程时遇到问题 当我通过并行python时出现跟随错误一个队列到子进程。 “通过继承”%类型(个体经营).__ name__ RuntimeError:队列对象只能进程之间通过继承共享在并行进程之间共享信号量对象python
当我用一个多进程库
import pp
import time
from multiprocessing import Event, Queue, Manager, Pool
e = Queue()
def startt() :
e.put(1)
return 1
ppservers =()
# Creates jobserver with automatically detected number of workers
jobServer = pp.Server(ppservers=ppservers,proto=2)
#submit the work to the job pool or job server
job = jobServer.submit(startt,(e,),(),("time",), globals = globals())
res = job()
print e.get()
print res
我试着与经理,但我得到认证错误,但在我的程序中没有提供authkey。以下是错误信息 – user2088083
answer_challenge中的第435行文件“C:\ Python27 \ lib \ multiprocessing \ connection.py”raise AuthenticationError('摘要发送被拒绝') multiprocessing.AuthenticationError :(AuthenticationError('digest sent was was被拒绝',),<函数RebuildProxy在0x02C81070>,(<函数AutoProxy在0x02C81BF0>,令牌(typeid ='队列',地址='\\\\。\\ pipe \\ pyc-7364-1-gupzzw', '''''''',''''','''','''','''','''','''','''' task_done')})) – user2088083
@ user2088083回复在评论中很难理解。作为一个新问题发布后续会更好。我还没有看到那种认证错误,所以我认为我没有什么帮助。将它作为新问题发布会让它更具可见性。 – skrrgwasme