Geeks With Blogs
Kalyan Krishna Kalyan's technology blog March 2008 Entries
C# lock / VB.NET SyncLoc, .NET Monitor.Enter Tip to avoid data corruption
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 ......

Posted On Friday, March 14, 2008 4:15 AM

Copyright © Kalyan Krishna | Powered by: