zeromq/clrzmq — Issue #48: Thread.Sleep(0) On Socket.Recv(int timeout) causes 100% core utilization on .net 3.5
Author: gbaurand
Created: 2012-02-21 12:28:25+00:00
State: open

When doing a socket.Recv(1000) with a slow or temporary unavaible server, the call is CPU intensive because on .net 3.5, the loop involves a Thread.Sleep(0). (On .net 4, replaced by a Thread.Yield)

I encountered the problem when doing fault tolerance test with a server going down intermittently.

Replacing with Thread.Sleep(1) solves the problem.