summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-01-14 20:01:24 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-01-14 20:01:24 +0000
commit2153d69672a90ba56e169319e9dbf27dc5bac466 (patch)
tree081b96d6d8ff6c3eada1ee33d0e20bf1a7ba8679 /libcxx/src
parent49e022df8f7906aed5bb0bd3fbe8b8f374642198 (diff)
downloadbcm5719-llvm-2153d69672a90ba56e169319e9dbf27dc5bac466.tar.gz
bcm5719-llvm-2153d69672a90ba56e169319e9dbf27dc5bac466.zip
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934.
llvm-svn: 172456
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/future.cpp2
1 files changed, 1 insertions, 1 deletions
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
OpenPOWER on IntegriCloud