private static bool tryEnter(Object syncObj) { bool lockTaken = false; System.Threading.Monitor.TryEnter(syncObj, ref lockTaken); return lockTaken; } }