Is it just me or something is seriously wrong with new Python futures module on windows -
i on windows xp , have problems new python 3.2 futures module. seems unable processpoolexecutor work. session example:
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" more information. >>> concurrent import futures >>> executor = futures.processpoolexecutor() >>> def pio(x): ... print("i here") ... return true ... >>> fut = executor.submit(pio, 5) >>> process process-1: traceback (most recent call last): file "c:\python32\lib\multiprocessing\process.py", line 259, in _bootstrap self.run() file "c:\python32\lib\multiprocessing\process.py", line 114, in run self._target(*self._args, **self._kwargs) file "c:\python32\lib\concurrent\futures\process.py", line 133, in _process_worker call_item = call_queue.get(block=true, timeout=0.1) file "c:\python32\lib\multiprocessing\queues.py", line 131, in res = self._recv() attributeerror: 'module' object has no attribute 'pio' >>> fut.running() true
it looks wrong here me. !
you have aware concurrent.future module use multiprocessing module (especially when used processpoolexecutor
), functionality not work in interactive interpreter, read more on note here.
Comments
Post a Comment