// Wait for response. Disposes and removes semaphore. private void WaitForResponse(int requestSeqNum) { RequestSemaphore[requestSeqNum].Wait(); RequestSemaphore[requestSeqNum].Dispose(); RequestSemaphore.Remove(requestSeqNum); }