From: Maxim Terletsky [mailto:[email protected]] 
Sent: Thursday, July 11, 2013 2:17 PM
To: 'Ilya Kazovsky'
Subject: RE: Ненужное письмо, т.к. см предыдущее.

 

Hi all,

I'm using 0MQ in C#. In a separate thread I run:

[code]

poller = new Poller( new[] { socket } );            

while( !token.IsCancellationRequested )

{

poller.Poll( timeout );

}

[/code]

This thread utilizes 100% CPU and it doesn't matter what timeout I pass to
the Poller.Poll.

Is there a possibility to poller.Poll wait for the socket event without
utilzation of the CPU?

 

I also tried 

[code]

poller = new Poller( new[] { socket } );            

while( !token.IsCancellationRequested )

{

poller.Poll( timeout );

Thread.Sleep(1);

}

[/code]

 

It's better but still eating a lot of CPU. Is there another way?

---

Yours faithfully, Ilya.

 

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to