zturner added a comment.

Personally I think it would be clearer to just use `std::unique_lock<>`.  
Already it's locking the mutex twice, once with a `lock_guard` and once when 
creating a `BreakpointSiteList::Guard`.  Which works I guess because it's a 
recursive mutex, but it's still confusing.  I would vote to just make a 
`std::unique_lock` and then `return std::move(guard);`

It might be true that allowing the use of manual `lock` and `unlock` is unsafe, 
but adding additional code also has some cost.


lldb-commits mailing list

Reply via email to