Blame view

OS.Spin/OS.Spin.Running/Controller.cs 524 Bytes
8ca6e89d   Tuo Wenbo   20211021
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace OS.Spin.Running
  {
      public class Controller
      {
          private static Controller _cer = null;
          private static object _objLock = new object();
          public static Controller GetInstance()
          {
              lock (_objLock)
              {
                  return _cer ?? (_cer = new Controller());
              }
          }
  
          private Controller()
          {
  
          }
      }
  }