compnerd marked an inline comment as done. compnerd added inline comments.
================ Comment at: include/__threading_support:474 + system_clock::time_point(duration_cast<system_clock::duration>(duration)); + auto timeout_ms = duration_cast<milliseconds>(abstime - system_clock::now()); + ---------------- halyavin wrote: > Since negative timeouts can't be avoided, we must make sure that > timeout_ms.count() is at least zero. Good point. I suppose that the assert takes care of that though. ================ Comment at: include/__threading_support:476 + + _LIBCPP_ASSERT(timeout_ms.count() > INFINITE && "timeout duration overflow"); + if (!SleepConditionVariableSRW(__cv, __m, timeout_ms.count(), 0)) ---------------- halyavin wrote: > It is >= INFINITE. _LIBCPP_ASSERT has 2 arguments and supports error message > out of the box. Shouldnt this be, `timeout_ms.count() > 0` which implicitly ensures that it is not `INFINITE` (-1)? Repository: rL LLVM https://reviews.llvm.org/D28220 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits