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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -