001 Concurrency

One, concurrent

  There are so many problems with concurrency that we don't even know when our program is correct.

    This question seems absurd, can't it be tested? Can't it be locked?

  In the test environment, we can simulate the presentation of high-concurrency business scenarios. That is to say, the construction of our test environment is not an easy task.

  Locking: Locking is not an easy task. The scope of the lock is large, the efficiency is low, and the concurrency is probably not as good as the block executed by a single thread. The position of the lock is unreasonable, and it is deadlocked. Once such a thing occurs, it is another troublesome things.

  In general, it is difficult for us to think about the problems that arise when concurrency occurs, and our best way is to choose the correct solution that has been proved to solve the problems we face.

     Everything needs to start from scratch again, there is no way, that is better than the comfort of being helpless when something goes wrong.

    Here is to record your own test cases. The source of the code is the content of blog articles from all over the world. After you have a more comprehensive understanding, you can summarize a suitable one for yourself.

      The only question is the system.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325087500&siteId=291194637
001