Why does nginx’s spin lock need to determine the number of CPUs?
I think the role of the spin lock is to keep trying to get the lock if it cannot be obtained.
In the source code of nginx
, the spin lock
is implemented as follows:
I think the role of the spin lock is to keep trying to get the lock if it cannot be obtained.
In the source code of nginx
, the spin lock
is implemented as follows: