[zeromq-dev] Trouble with Python bindings

Martin Sustrik sustrik at fastmq.com
Tue Jul 28 15:58:37 CEST 2009


Josip,

>> Calling nonblocking receive in infinite loop?
> 
> Yes (inside an thread created with Twisted) 

Using 100% CPU time is what you would expect when using a busy loop, no?

When you call receive with block argument set to false, it'll just check 
whether any messages are available and return immediately if it's not 
the case. Consequently your loop will be running on and on without a 
pause => 100% CPU usage.

Martin



More information about the zeromq-dev mailing list