예제 #1
0
 private void RemoveFromWait(AwaitingTask task)
 {
     lock (_waitList)
     {
         if (_waitList.Contains(task))
         {
             _waitList.Remove(task);
         }
     }
 }
예제 #2
0
        private AwaitingTask RegisterWait(string expectedResponse, int timeout)
        {
            AwaitingTask task = new AwaitingTask(expectedResponse, timeout);

            lock (_waitList)
            {
                _waitList.Add(task);
            }

            return(task);
        }