Deadlock problem using multiprocessing

Jacky Liu bluegene8210 at
Sun Sep 11 11:46:40 EDT 2011

> I get this exception when I run the first program:
> Exception in thread Thread-1:
> Traceback (most recent call last):
>   File "/usr/lib/python3.1/", line 516, in _bootstrap_inner
>   File "/usr/lib/python3.1/", line 469, in run
>     self._target(*self._args, **self._kwargs)
>   File "/usr/lib/python3.1/multiprocessing/", line 231, in _handle_tasks
>     put(task)
>   File "/usr/lib/python3.1/", line 1349, in dumps
>     Pickler(f, protocol, fix_imports=fix_imports).dump(obj)
> _pickle.PicklingError: Can't pickle <class 'method'>: attribute lookup
> builtins.method failed
> There is no deadlock.  You are hitting this problem:
> --
> regards,
> kushal

You're right. I just realized that I was running the program through
my Vim plug-in which would use the subprocess module to open the
process, wait for its termination and get the output. It seems that
multi-process program would act quite differently such that my Vim
plug-in had been halted without getting any error information, so I
was to falsely take it as a deadlock.

The thread in stackoverflow you referenced is great, now I'm trying to
fit the solution in my own program, thanks a lot!

More information about the Python-list mailing list