Skip to content
  • Romain Vimont's avatar
    MediaLibrary: Add priority access mechanism · 1a332d73
    Romain Vimont authored
    In addition to read-lock and write-lock, add a "priority access"
    mechanism. The goal is to give priority to UI requests.
    
    Several callers may acquire a "priority access". As soon as at least
    one caller has priority access, all non-priority callers are blocked on
    lock_read() and lock_write(), until all priority accesses are released.
    However, they can continue executing their current requests following
    the traditional RW-lock rules.
    
    Acquiring a priority access is "immediate". It is different from a lock
    in that it never blocks but makes other clients wait.
    1a332d73