等待句柄增加所在任务ID以及用户对象,便于业务层跨任务传递数据

This commit is contained in:
大石头X2 2017-03-08 11:00:30 +08:00
parent 09430efa68
commit 017035f573
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,9 @@
WaitHandle::WaitHandle()
{
Result = false;
TaskID = Task::Current().ID;
State = nullptr;
}
bool WaitHandle::WaitOne(int ms)

View File

@ -5,6 +5,8 @@
class WaitHandle
{
public:
uint TaskID; // 句柄所在任务
void* State; // 用户数据
bool Result; // 结果
WaitHandle();