G
Guest
I'm working in Visual Studio 2005.
I have the following method. I'm trying to figure out why I wouldn't want to
wrap the contents in a lock(MyLockObject) {...} Seems to me that having a
static method in a mutlithreaded environment isn't thread safe.
public static MyDataSet Load()
{
//Open database connection
//Load data from database into dataset
//Close connection
}
Any thoughts?
Thanks,
Randy
I have the following method. I'm trying to figure out why I wouldn't want to
wrap the contents in a lock(MyLockObject) {...} Seems to me that having a
static method in a mutlithreaded environment isn't thread safe.
public static MyDataSet Load()
{
//Open database connection
//Load data from database into dataset
//Close connection
}
Any thoughts?
Thanks,
Randy