0
我必須將一個項目移植到緊湊框架。而不能轉化爲用於Compact Framework的ThreadPool.RegisterWaitForSingleObject?
ThreadPool.RegisterWaitForSingleObject (WaitHandle中,WaitOrTimerCallback, 對象,INT,BOOL)
什麼可能是在C#中ThreadPool.RegisterWaitForSingleObject一個替代方式
lock (this.RegLock)
{
if (!this.WaitFlag)
{
this.mre.Reset();
if (this.handle != null)
{
this.handle.Unregister(null);
}
this.handle = ThreadPool.RegisterWaitForSingleObject(this.mre, this.WOTcb, null, this.Interval, true);
}
else
{
this.StartFlag = true;
if (this.Interval < this.timeout)
{
this.timeout = this.Interval;
}
}
}
waitHandle.WaitOne應該是這樣的CF if(waitHandle.WaitOne(timeout,bool)) – 2009-11-09 13:32:06