When is busy waiting not less efficient than blocking wait?

  • 1

    In a multiprocessor environment --a process can spin on one processor while waiting for the lock to be released by another process running on a different processor. The former process can resume as soon as it acquires the lock.

  • 3

    Busy waiting is a good idea when you know the wait is not too long.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.