MyEvent.SetEvent; // 同步信号置位

MyEvent.SetEvent;   //  同步信号置位

TSimpleEvent.Create = TEvent.Create(nil, True, False, nil)
                   = CreateEvent(nil, True, False, nil);
其中第三个参数表示同步信号初始化时状态
True表示置位Signaled,即SetEvent
False表示复位nonSignaled,即ResetEvent

WaitFor(Timeout) = (wrSignaled, wrTimeout, wrAbandoned, wrError);
分别表示条件:
1、超时或信号置位  2、只是超时   3、超时前信号Destroy  4、超时前发生错误

posted on 2019-02-26 12:01  newlives  阅读(439)  评论(0编辑  收藏  举报