However, creating a DataView on a DataTable is a write operation on a DataTable. Most people don't know this, and its not very intuitive so I don't blame them for not knowing this. What happens when you create a DataView on a DataTable is the DataView will create an index on the DataTable and this index is stored in the DataTable. The reason for this is performance, for example if you create a DataView saying "F1=1" as the criteria, this creates an internal index on the DataTable to locate this information. Later on if you create another DataView with the same criteria, the index is reused, so this improves performance. However the fact that these indexes are stored inside the DataTable means that these are write operations to the DataTable and thus they are not thread safe.Just goes to show you, when an object doesn't say it's threadsafe, don't assume that it's threadsafe, even if it's "just a read".
Wednesday, June 6, 2012
The importance of implementation details
Today, after years of odd threading bugs, I learned that creating a DataView and various other reads on a DataTable are actually write operations.
E.g. from the first link
Thursday, May 31, 2012
Tuesday, May 22, 2012
A grep for the ages
If you like running old software, The Heirloom Project may be for you. They feature
. . . traditional implementations of standard Unix utilities. In many cases, they have been derived from original Unix material released as Open Source by Caldera and Sun.Nothing I like more than a SysV utility updated with UTF8 support.
Saturday, May 19, 2012
DNS problems?
Running RAS on your domain controller?
Check out this KB article.
It took me quite a while to figure out what was going on, though I just moved RAS to another box instead of taking the steps in the article.
Tuesday, May 15, 2012
Terrifying things seen on the Internet
Never a good sign when someone slips this in at the end of their post:
We are moving away from TeamBox.com as our Project Management suite as it just wasn't development oriented as we needed and we currently have no Version Control system.You may have more problems than can be solved by posting on a StackExchange.
Monday, May 14, 2012
What does bulk-logged mean anyway?
It doesn't always mean what you think it means, and it's not always faster. But it can save you a lot of log space when rebuilding an index.
Wednesday, May 9, 2012
Test your email client
See how much valuable personal data you are leaking. The Email Privacy Tester is revamped and rereleased, and reGPLd. Well, GPLd at least.
Subscribe to:
Posts (Atom)