potatomaster42 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Python threads are not run in parallel #301

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In my python plugin I run several tasks (a lot) in parallel (16 threads). But 
my cpu utilization on gvim 13% (I have 8 cores). I see from process explorer 
that the thread are created. I tried the code without vim with the same 
parameters it get 97% of cpu.
Does python threading module works in vim?

Original issue reported on code.google.com by CanisMaj...@gmail.com on 24 Dec 2014 at 9:54

GoogleCodeExporter commented 9 years ago
Does it work in Python itself?

Are you aware of the Python Global Interpreter Lock?  
https://wiki.python.org/moin/GlobalInterpreterLock

Original comment by mged...@gmail.com on 24 Dec 2014 at 10:04

GoogleCodeExporter commented 9 years ago
No I am not aware of this. How can I remove that lock?

Original comment by CanisMaj...@gmail.com on 24 Dec 2014 at 10:10

GoogleCodeExporter commented 9 years ago
Is it that the python multithreading programming is not parallelizable? Do you 
think multiprocessing modules would work?

Original comment by CanisMaj...@gmail.com on 24 Dec 2014 at 10:20