diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-05-19 15:05:04 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-05-19 15:05:04 +0000 |
commit | ec0810e1c8e690ebbf571670820392d52fb23b75 (patch) | |
tree | d4646969f53e635646ead35706b54fad1aa256ca /libcxx/include/mutex | |
parent | b8f65e25d8e1a9e45bee589a9238cf6fe8363b88 (diff) | |
download | bcm5719-llvm-ec0810e1c8e690ebbf571670820392d52fb23b75.tar.gz bcm5719-llvm-ec0810e1c8e690ebbf571670820392d52fb23b75.zip |
I had a giant misunderstanding of what 'synchronizes with' meant in [futures.async]/p5. This invalidated the current design of async in <future>. This is a new design, based on my new understanding, which has been confirmed on the lwg mailing list. The summary is that ~future() (and ~shared_future()) will block when they are created from within async, and the thread hasn't finished yet. As part of this work I created two new type traits: __invokable<F, Args...>::value and __invoke_of<F, Args...>::type. These are what result_of<F(Args...)> wanted to be when it grew up, but never will be. __invoke_of is carefully crafted so that it can serve as its own enable_if (type doesn't exist if the signature isn't invokable). All of this work is C++11 only.
llvm-svn: 131639
Diffstat (limited to 'libcxx/include/mutex')
-rw-r--r-- | libcxx/include/mutex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/mutex b/libcxx/include/mutex index fcfe4b71d89..69192a82f3d 100644 --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -485,7 +485,7 @@ private: _LIBCPP_INLINE_VISIBILITY void __execute(__tuple_indices<_Indices...>) { - _STD::move(_STD::get<0>(__f_))(_STD::move(_STD::get<_Indices>(__f_))...); + __invoke(_STD::move(_STD::get<0>(__f_)), _STD::move(_STD::get<_Indices>(__f_))...); } }; |