Working with multiple threads is never easy and every now and then I keep running into seemingly bizarre issues and learn something new by fixing it.. This time it was about how to use the object lock statement (C# lock / VB.NET SyncLoc, .NET Monitor.Enter) properly. See I had this method that was acting as a callback handler form a Delegate.BeginInvoke call. I had a dataset that was to be updated by multiple threads, so I had written code like following DataSet _sharedDataset = new DataSet(); private...