Static slows down

I don’t know how this works, but I have a question: Static makes the application slow, since the same variable or method is distributed throughout the application, and although one request uses the method or variable, the other must wait until it is released.

+3
source share
2 answers

No, it is not. In addition .NEt does not automatically block variables just because you are simultaneously accessing them from different parts of the program. You will have to implement the lock yourself.

+5
source

, . . , , /, , . ( , , , "" )

+5

Source: https://habr.com/ru/post/1724487/


All Articles