• Guido Trotter's avatar
    SharedLock: remove wrong assertion in code · 9a39f854
    Guido Trotter authored
    r644 contained some cleanup code for LockSet. Among other things it removed a
    syntax error that allowed an assertion that previously wan't really checked to
    trigger. It turns out that even though the spirit of that assertion was correct
    its actual implementation was wrong.
    
    While it's true that no sharers must be waiting if an exclusive holder is not
    present it might happen that when all the sharers wake up one of them releases
    the lock before some other even has had a chance to run. In this case
    __shr_wait would still be greater than 0, even if the sharer is not actually
    waiting, just pending a wakeup to proceed.
    
    Thus, removing the assertion in question.
    
    Reviewed-by: imsnah
    9a39f854
locking.py 27.4 KB