v7.3.2018.0614   重构高性能资源池,减少GC压力,增加线程池,让异步任务得到平等竞争CPU的机会
大石头 编写于 2018-06-14 17:56:44
X
using System;

#if NET4
namespace System
{
    internal static class LightupType
    {
        public static readonly Type ParameterizedThreadStart = GetExternallyVisibleType("System.Threading.ParameterizedThreadStart, mscorlib");

        public static readonly Type ExecutionContext = GetExternallyVisibleType("System.Threading.ExecutionContext, mscorlib");

        public static readonly Type ContextCallback = GetExternallyVisibleType("System.Threading.ContextCallback, mscorlib");

        public static readonly Type OperatingSystem = GetExternallyVisibleType("System.OperatingSystem, mscorlib");

        private static Type GetExternallyVisibleType(string typeName)
        {
            Type type = Type.GetType(typeName);
            if (type != null && type.IsVisible)
            {
                return type;
            }
            return null;
        }
    }
}
#endif