3 comments on “DataTables != Thread Safe

  1. I saw this and your previous post on using your thread safe pattern. I highly suspect that DataTable is simply manipulating a flat data object in the background that it will eventually render into HTML.

    If you’re really wanting to optimize this you may want to get the initial data from the database into a thread safe collection and then run that through your pipeline. Then simply pass the pipeline output to the datatable’s data source.

    Sounds like fun! :)

    • I’m working with the DataTable object (instead of DataSets). I would love to use POCO’s instead of DataTables but I can’t for a few reasons. But it’s important to pay attention when working with multi-threading and parallelism. I already knew DataSet, DataTable and DataRow were not thread safe, but I assumed some operations were. But it turns out, it isn’t!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s