multiprocessing.Queue & vim python interpreter

unknown3000 at gmail.com unknown3000 at gmail.com
Sun Jan 18 19:20:01 EST 2015


Hi,

I am experimenting on a fork of vim-plug for managing vim plugins. I wanted to add parallel update support for python since ruby isn't nearly as common. I've come across a weird bug that only seems to happen when I'm inside vim, I'm wondering if someone could tell me why. 

This problem can be reproduced by sourcing a vim file with the following snippet. Then execute the command PyCrash.
command! -nargs=0 PyCrash call s:py_crash()
function! s:py_crash()
    python << EOF
import multiprocessing as multi
queue = multi.Queue()
queue.put('a')
queue.close()
EOF
endfunction

This prints to messages the following:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 266, in _feed
    send(obj)
IOError: [Errno 32] Broken pipe

Any thoughts?



More information about the Python-list mailing list