我似乎无法找到有关线程安全的任何文件...
I can't seem to find any documentation regarding thread safety...
在特别 - 是数据库
类(和子类)线程安全的。
In particular - is the Database
class (and subclasses) thread safe
我怎么会发现这一点为自己?是否有参考线程安全的类在MSDN网站?
How would I find this out for myself? Are there references to thread safety for classes on the MSDN site?
是的,数据库
类的实例是线程安全的。然而,它创建的对象(如 SqlDataReader的
)都没有。
Yes, instances of the Database
class are thread-safe. However, objects created by it (such as SqlDataReader
) are not.
上一篇:System.Transactions.Diagnostics.DiagnosticTrace 抛出 TypeInitializationException抛出、Transactions、System