示例#1
0
 public void OnCompleted()
 {
     lock (parent.gate) {
         parent.rightCompleted = true;
         if (parent.leftCompleted)
         {
             parent.OnCompleted();
         }
     }
 }
示例#2
0
 public void OnCompleted()
 {
     lock (parent.gate)
     {
         parent.isCompleted[index] = true;
         bool flag = true;
         for (int i = 0; i < parent.length; i++)
         {
             if (!parent.isCompleted[i])
             {
                 flag = false;
                 break;
             }
         }
         if (flag)
         {
             parent.OnCompleted();
         }
     }
 }
示例#3
0
                public void OnCompleted()
                {
                    lock (parent.gate) {
                        parent.isCompleted[index] = true;

                        var allTrue = true;
                        for (int i = 0; i < parent.length; i++)
                        {
                            if (!parent.isCompleted[i])
                            {
                                allTrue = false;
                                break;
                            }
                        }

                        if (allTrue)
                        {
                            parent.OnCompleted();
                        }
                    }
                }