.net - is System.DirectoryServices.AccountManagement.GroupPrincipal thread safe? -


I am writing a program that will create users in bulk, I have an operation that will build blocks It is about 5 seconds, to get around it I was going to thread it and everything was sitting in a thread pool.

My question is, if I make theory outside the thread and group theory to thread and call group.Members.Add (u) and group.Save () Can I get in trouble? Would it be better to create new group principals from within each thread?

from:

Any such public static (visual Share in Basic) Threads are safe Members of any instance are not guaranteed to secure thread.

This small note is very common in documentation. To determine this, the programmer is up to you to understand what you mean by "thread safe" and how to control concurrent access.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -