Hi Oleg.
I think I tried this a while back and IIRC you may need to do a few of
things:
1. Import multiprocessing first, if you actually want to use multiple
processes. BTW multiprocessing will only start cpu_count processes by
default unless you override it in Pool.
2. patch things individually instead of patch_all and dont patch fork
(patch_os) (you may need to leave out patch_thread too) see
http://www.gevent.org/gevent.monkey.html
3. Make sure that none of your code uses fork or threads.
Unfortunately I don't recall if I got it work the way I wanted so YMMV.
HTH
AM
On 08/25/2012 04:05 AM, Oleg Korsak wrote:
> changing the order doesn't solve the problem
>
> суббота, 25 августа 2012 г., 4:32:27 UTC+3 пользователь Ian E написал:
>
> I'm fairly sure you have to monkey patch after you finish all your
> imports. Try moving "frommultiprocessingimportPool" to the top.
>
> Ian Epperson
>
> On Fri, Aug 24, 2012 at 3:55 PM, Oleg Korsak
> <
kamikaze.is...@gmail.com <javascript:>> wrote:
>
> Hello, everybody!
> I have a problem while runnung this simple code:
>
>
https://gist.github.com/3456736 <
https://gist.github.com/3456736>
>
> It just freezes without any output at all. After pressing Ctrl+C
> I'm getting this:
>
>
https://gist.github.com/3456773 <
https://gist.github.com/3456773>