|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Newbie: ADO.NET and thread safetyI've multiple related data tables in a disconnected dataset which could be accessed by mutltiple threads to read and write data. The documentation says that dataset and datatable are thread safe to read in multithreaded environment but one needs to lock them to update. Questions: 1) Is it not required to synchronize when searching data using Find, Select and GetChildRows methods ? 2) Is it not required to synchronize when reading data using from returned rows from above ? 3) When updating a row in a datatable, is it required to lock only datatable or the whole dataset ? 4) Is ReaderWriterLock recommended in this disconnected scenario or using Monitor/lock is "good enough" ? Thanks in advance and regards Navin Response appreciated!
Thanks in advance and regards Navin Show quote "Navin Mishra" <navin.mis***@siemens.com> wrote in message news:%23IUnDHv5FHA.2600@tk2msftngp13.phx.gbl... > Hi, > > I've multiple related data tables in a disconnected dataset which could be > accessed by mutltiple threads to read and write data. The documentation says > that dataset and datatable are thread safe to read in multithreaded > environment but one needs to lock them to update. Questions: > > 1) Is it not required to synchronize when searching data using Find, Select > and GetChildRows methods ? > 2) Is it not required to synchronize when reading data using from returned > rows from above ? > 3) When updating a row in a datatable, is it required to lock only datatable > or the whole dataset ? > 4) Is ReaderWriterLock recommended in this disconnected scenario or using > Monitor/lock is "good enough" ? > > Thanks in advance and regards > > Navin > > |
|||||||||||||||||||||||