日期:2014-05-17 浏览次数:20887 次
while (ThreadStatus.thread_running == m_status)
{
mMessage msg = null;
lock (m_queueLock)
{
if (t_msgQueue_high.Count > 0)
{
msg = t_msgQueue_high[0];
t_msgQueue_high.RemoveAt(0);
}
else if (t_msgQueue_Ordinary.Count > 0)
{
msg = t_msgQueue_Ordinary[0];
t_msgQueue_Ordinary.RemoveAt(0);
}
else if (t_msgQueue_low.Count > 0)
{
msg = t_msgQueue_low[0];
t_msgQueue_low.RemoveAt(0);
}
else
{
Thread.Sleep(1);
continue;
}
}
if (