System.Threading.Mutex not supported?

Hi all,

I need to coordinate access to storage that gets updated via a network callback and thus happens asynchronously and based on the error messages I’m getting, in a multi threaded sort of fashion, i.e. the data gets put in a dictionary and then modified in other places in the program and sometimes that happens simultaneously with a network update, triggering errors like this:

InvalidOperationException: out of sync at System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Object].VerifyState

How does one coordinate access in a unity conforming sort of fashion?

Tried to use C#'s lock, instead of mutex? lock statement

example:

lock(this)

{

  ... perform operations ...

}