我正在阅读一些 .NET 代码,并在DispatcherSynchronizationContext中发现以下内容
///
/// Wait for a set of handles.
///
///
/// Critical - Calls WaitForMultipleObjectsEx which has a SUC.
///
[SecurityCritical]
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.ControlPolicy|SecurityPermissionFlag.ControlEvidence)]
public override int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
{
if(_dispatcher._disableProcessingCount > 0)
{
// Call into native code directly in order to avoid the default
// CLR locking behavior which pumps messages under contention.
// Even though they try to pump only the COM messages, any
// messages that have been SENT to the window are also
// dispatched. This can lead to unpredictable reentrancy.
return MS.Win32.UnsafeNativeMethods.WaitForMultipleObjectsEx(waitHandles.Length, waitHandles, waitAll, millisecondsTimeout, false);
}
else
{
return SynchronizationContext.WaitHelper(waitHandles, waitAll, millisecondsTimeout);
}
}
“拥有 SUC”是什么意思?