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

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -