From 2153d69672a90ba56e169319e9dbf27dc5bac466 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 14 Jan 2013 20:01:24 +0000 Subject: Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934. llvm-svn: 172456 --- libcxx/src/future.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/src') diff --git a/libcxx/src/future.cpp b/libcxx/src/future.cpp index feb37e42db4..7d9a5b5da69 100644 --- a/libcxx/src/future.cpp +++ b/libcxx/src/future.cpp @@ -78,8 +78,8 @@ __assoc_sub_state::set_value() throw future_error(make_error_code(future_errc::promise_already_satisfied)); #endif __state_ |= __constructed | ready; - __lk.unlock(); __cv_.notify_all(); + __lk.unlock(); } void -- cgit v1.2.3