在Windows上新的Python期货模块只是我或者是严重错误的
发布时间:2020-12-14 04:02:27 所属栏目:Windows 来源:网络整理
导读:我在 Windows XP上,我遇到了新的 Python 3.2期货模块的问题. 好像我无法让ProcessPoolExecutor工作. 会话示例: Python 3.2 (r32:88445,Feb 20 2011,21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help","copyright","credits" or "license" for mo
我在
Windows XP上,我遇到了新的
Python 3.2期货模块的问题.
好像我无法让ProcessPoolExecutor工作. 会话示例: Python 3.2 (r32:88445,Feb 20 2011,21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help","copyright","credits" or "license" for more information. >>> from concurrent import futures >>> executor = futures.ProcessPoolExecutor() >>> def pio(x): ... print("I AM HERE") ... return True ... >>> fut = executor.submit(pio,5) >>> Process Process-1: Traceback (most recent call last): File "C:Python32libmultiprocessingprocess.py",line 259,in _bootstrap self.run() File "C:Python32libmultiprocessingprocess.py",line 114,in run self._target(*self._args,**self._kwargs) File "C:Python32libconcurrentfuturesprocess.py",line 133,in _process_worker call_item = call_queue.get(block=True,timeout=0.1) File "C:Python32libmultiprocessingqueues.py",line 131,in get res = self._recv() AttributeError: 'module' object has no attribute 'pio' >>> fut.running() True 这对我来说看起来有些不对劲.救命 ! 解决方法
您必须知道
concurrent.future模块使用
multiprocessing模块(特别是当您使用ProcessPoolExecutor时),因此某些功能在交互式解释器中不起作用,请参阅Note
here.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在Windows上运行PHP应用程序 – 守护进程或cron?
- windows-server-2008-r2 – KMS – 所有客户端都处于“初始
- windows – 如果同一任务已在运行,如何防止计划任务运行?
- WPF RibbonWindow Windows 8 – 控制框看起来很糟糕
- windows-server-2008-r2 – 如何在共享驱动器上自动删除/ t
- Windows – 运行Powershell而不是VBScript有哪些优点?
- 在Windows上运行vim会留下不可写的交换文件
- windows-mobile – 如何自动更新Windows Mobile应用程序
- windows-server-2003 – 什么原因导致重复的ACK记录?
- windows-server-2008 – “服务器管理器 – >配置 – >本