bcraig added inline comments.

================
Comment at: src/condition_variable.cpp:86
@@ +85,3 @@
+    if (tl_ptr.get() == nullptr) {
+        tl_ptr.set_pointer(new __thread_struct);
+    }
----------------
The standard synopsis of notify_all_at_thread_exit in the standard doesn't have 
a "Throws:" clause.  I think that means that this is non-conformant.

There is some phrasing in 30.2.2 [thread.req.exception]:
   Failure to allocate storage shall be reported as described in 17.6.5.12 
[res.on.exception.handling].
But I don't see wording in that section that gives permission to throw from 
functions without Throws clauses.

From a user perspective, I generally expect my synchronization primitives to be 
no-throw.  I don't know if it is really possible to provide that guarantee with 
notify_all_at_thread_exit though, especially if we want it to work outside of a 
std::thread.


https://reviews.llvm.org/D24159



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

Reply via email to