Blocking and deadlock are two different concepts.
For example, there are threads 1 and 2, thread 1 occupies resource A, and thread 2 occupies resource B. At this time, thread 2 needs to use resource A to continue, but resource A is occupied by thread 1, so thread 2 can only wait for resource A to be released by thread 1, which is called thread 2 being blocked.
However, if thread 1 may require resource B to continue at this time, both threads will wait for the other party to release the resource, which is a deadlock.
To put it simply, blocking is generally not called cyclically, and deadlocks are called cyclically.
The following content is for your reference:
Understand and solve SQL Server 7.0 or 2000 blocking Problems
Http://support.microsoft.com /? Id = 224453
Blocking cannot be avoided. As long as a concurrent task is executed, this phenomenon may occur.
Deadlock should be avoided. The main method is to writeProgramWhen you try to use a variety of methods to avoid loop calls, and set a maximum wait time.