62,074
社区成员
发帖
与我相关
我的任务
分享
private AutoResetEvent methodWait = new AutoResetEvent(false);
private AutoResetEvent pageWait = new AutoResetEvent(false);
......................
protected void btnSearch_Click(object sender, EventArgs e)
{
........
RegisteredWaitHandle han = System.Threading.ThreadPool.RegisterWaitForSingleObject
(
methodWait,
WaitOrTimer,
Account.GetGUID(CurrentUserId),
30000,
true
);
pageWait.WaitOne();
}
public void WaitOrTimer(object state, bool timedOut)
{
...........
}