ReleaseMutex : Object synchronization method was called from an unsynchronized block of code
- 阅读更多 关于 ReleaseMutex : Object synchronization method was called from an unsynchronized block of code
问题 I have this pretty straightforward piece of code that very rarely throws "System.ApplicationException : Object synchronization method was called from an unsynchronized block of code." when ReleaseMutex () is called. I logically analyzed the flow of the method and just cannot understand how/why this could happen. To my understanding, the ownership of mutex is guaranteed in this case: readonly string mutexKey; public Logger(string dbServer, string dbName) { this.mutexKey = ServiceManagerHelper