A
Alina
Hello
I'm working with a disconnected DataSet and I wish to make thread-safe the
"add new rows" method.
I try like this, but does not work:
public class MyXmlDataDoc
{
.....
System.Threading.Mutex m = null;
m = new System.Threading.Mutex(false, "NoPassingAdd2");
m.WaitOne();
this.DataSet.EnforceConstraints = false;
//add rows throgh the xml methods...
this.DataSet.EnforceConstraints = true;
m.ReleaseMutex();
.....
}
Could somebody give me a hit or an example how to do it (multi-threading)?
I do not wish to put a lock.
Thank you
I'm working with a disconnected DataSet and I wish to make thread-safe the
"add new rows" method.
I try like this, but does not work:
public class MyXmlDataDoc
{
.....
System.Threading.Mutex m = null;
m = new System.Threading.Mutex(false, "NoPassingAdd2");
m.WaitOne();
this.DataSet.EnforceConstraints = false;
//add rows throgh the xml methods...
this.DataSet.EnforceConstraints = true;
m.ReleaseMutex();
.....
}
Could somebody give me a hit or an example how to do it (multi-threading)?
I do not wish to put a lock.
Thank you