Ejemplo n.º 1
0
 /// <summary>
 ///    初始化整个Thrift协议栈环境
 /// </summary>
 /// <param name="segmentSize">内存片段大小</param>
 /// <param name="multiples">内存片段数量</param>
 public static void InitializeEnvironment(uint segmentSize, uint multiples)
 {
     lock (_lockTypeObj)
     {
         if (Instance == null)
         {
             SegmentSize = segmentSize;
             Multiples   = multiples;
             Instance    = new ThriftProtocolMemoryAllotter();
             Instance.Initialize();
         }
     }
 }
 /// <summary>
 ///    初始化整个Thrift协议栈环境
 /// </summary>
 /// <param name="segmentSize">内存片段大小</param>
 /// <param name="multiples">内存片段数量</param>
 public static void InitializeEnvironment(uint segmentSize, uint multiples)
 {
     lock (_lockTypeObj)
     {
         if (Instance == null)
         {
             SegmentSize = segmentSize;
             Multiples = multiples;
             Instance = new ThriftProtocolMemoryAllotter();
             Instance.Initialize();
         }
     }
 }