Denisio
-
2007-08-20
- priority: 5 --> 7
Connections.Connection.DoWorker using 100% CPU while working. On HyperThreading CPU - 50%. Check on few machines, working identically on all.
DoWorker fragment:
private void DoWorker ()
{
while (running) {
if (client.Client.Available > 0)
{
byte[] data = null;
lock (client_lock)
{
data = ReadData();
}
if (data != null)
{
Log.Debug("Read {0} bytes", data.Length);
HandleData(data);
}
}
Thread.Sleep(100);
}
}
}