我必须将一个项目移植到紧凑的框架中。并且无法转换为
ThreadPool.RegisterWaitForSingleObject (WaitHandle, WaitOrTimerCallback, object, 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;
}
}
}