c# - Exception when releasing a Mutex. What could cause this? -
i'm getting following exception "object synchronization method called unsynchronized block of code" when releasing mutex in code below:
int count = 0; try { mutex.waitone(); count = requests_sent.count; } catch { } { mutex.releasemutex(); }
requests_sent dictionary being accessed (read/write) other threads have no clue why code throwing exception. have ideas?
move waitone() call above try block. want release mutex when know acquired it.
you'll stand chance better diagnostic.
Comments
Post a Comment