Static Methods occupy a large amount of memory, fast speed, less memory for dynamic points, and slow speed ..
However, the Web is multi-threaded. If you call a static method, You need to lock it. This will slow down the call.
Multithreading. In principle, static members need to be protected. Any static member may be conflicted by multiple threads.
Thread locking
The synchronization method is set to avoid (possibly) the same resource
Cross-access between multiple threads in a process. Set settestlist () as the synchronization method, Program Executive
When the row is in the test. settestlist (list) method, it should be a thread Security But test. Star
T () method calling may cause thread safety: 1. If start () is used for S of the test object
The ettestlist () method does not enable other threads and calls the settestlist () method. The current process is in
Thread security status 2. If
Start () enables other threads for the test object, calls the settestlist () method, and opens the line
The number of threads is greater than 1, and the current process is in the thread unsafe state. Obviously, when the thread is not secure, add the Method
The synchronized keyword has a meaning.