• Yedidya Feldblum's avatar
    revise Synchronized LockedPtr to use lock types · b805d853
    Yedidya Feldblum authored
    Summary:
    Use `std::unique_lock`, `std::shared_lock`, and `folly::upgrade_lock`. There are two reasons:
    
    * Makes generic the use of `std::unique_lock` with `std::mutex`, which is currently special-cased.
    * Permits specializations of `std::unique_lock` and the other lock types to be found automatically.
    
    In particular, this permits the use of `Synchronized<T, DistributedMutex>`, which is only proxy-lockable and not lockable.
    
    Reviewed By: simpkins
    
    Differential Revision: D28705607
    
    fbshipit-source-id: 48daa2910ce16ee4fde6f5ea629a41d9768f3c87
    b805d853
LockTraits.h 17.7 KB