Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is XElement's add operation Thread Safe?

Is it safe to Add child elements to an XElement via its ADD method in a parallel way (as in a parallel foreach)?

Thanks!

like image 722
Francisco Noriega Avatar asked Nov 19 '10 22:11

Francisco Noriega


1 Answers

From the 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.

In other words, no, the add method is not thread safe.

like image 111
Daniel Renshaw Avatar answered Sep 18 '22 04:09

Daniel Renshaw