EricWF added a comment.

Unfortunately the discussion was offline so it's not available.

Anybody using `std::mutex` with `std::unique_lock` or their own lock guards 
will probably experience some breakage.

Heres an example of code that will now not compile with "-Werror=thread-safety"

  std::mutex m;
  m.lock();
  {
    std::unique_lock<std::mutex> g(m, std::adopt_lock);
  }  // -Wthread-safety thinks `m` is still locked

AFAIK we can't fully annotate `std::unique_lock` either because there is no way 
to model the deferred locking behavior.


http://reviews.llvm.org/D14731



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to