public static void BeginMark(string markerName, Color color) { if (SameThread()) { Console.BeginMark(markerName, color); } else { EnqueueAction((() => Console.BeginMark(markerName, color))); } }