예제 #1
0
 private void Update()
 {
     lock (lockResponseInputQ)
     {
         while (responseInputQ.Count > 0)
         {
             if (responseInputQ.First.Value != null)
             {
                 SocketResponse?.Invoke(responseInputQ.First.Value);
                 responseInputQ.RemoveFirst();
             }
         }
     }
 }
예제 #2
0
 void QueueResponse(SocketResponse response)
 {
     lock (lockResponseInputQ)
         responseInputQ.AddLast(response);
 }