1. 实现
1> 异步线程IO处理
![]()
unsigned CAsyncIO::ThreadWork()
{
int nRet = IO();
//map is better than array at here, but it need STL
unsigned uTid = GetCurrentThreadId();
for (int i = 0; i < sizeof(m_uThreadArray) / sizeof(m_uThreadArray[0]); i++)
{
//Because handle is not same at different thread, so it need use tid to associate the thread and IO caller.
if (uTid == m_uThreadArray[i])
{
NotifyProgress(100, i);
NotifyResult(nRet, i);
}
}
return nRet;
}
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



