if (queue.Count > 0) { lock (locker) ; port.Write(queue.Dequeue()); lock (locker) ; }