gpt4 book ai didi

c# - XElement 的添加操作是线程安全的吗?

转载 作者:太空狗 更新时间:2023-10-29 22:34:41 26 4
gpt4 key购买 nike

以并行方式(如在并行 foreach 中)通过其 ADD 方法将子元素添加到 XElement 是否安全?

谢谢!

最佳答案

来自documentation :

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

换句话说,不,add 方法不是线程安全的。

关于c# - XElement 的添加操作是线程安全的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4230058/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com