summaryrefslogtreecommitdiffstats
path: root/libcxx/src/future.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Remove race condition in std::asyncLouis Dionne2018-08-241-4/+1
| | | | | | | | | | | | | | | | | Summary: The state associated to the future was set in one thread (with synchronization) but read in another thread without synchronization, which led to a data race. https://bugs.llvm.org/show_bug.cgi?id=38181 rdar://problem/42548261 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D51170 llvm-svn: 340608
* Code cleanup - change naked 'throw' expressions to call helpre function ↵Marshall Clow2018-07-301-33/+11
| | | | | | '__throw_future_error'. The behavior change is that if you build libc++ with exceptions disabled, and then use that in a program that sets the value of the future twice (for example), it will now abort instead of behaving unpredictably. llvm-svn: 338332
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-101-0/+2
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* Fix PR23293 - Do not unlock shared state before notifying consumers.Eric Fiselier2015-06-121-5/+0
| | | | | | | | Within the shared state methods do not unlock the lock guards manually. This could cause a race condition where the shared state is destroyed before the method is complete. llvm-svn: 239577
* Allow libc++ to be built on systems without POSIX threadsJonathan Roelofs2014-09-051-0/+6
| | | | | | | | | | If you're crazy enough to want this sort of thing, then add -D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and --param=additiona_features=libcpp-has-no-threads to your lit commnad line. http://reviews.llvm.org/D3969 llvm-svn: 217271
* Fix GCC unknown pragma warning in libc++.Logan Chien2013-12-141-0/+9
| | | | | | | | | | We should check defined(__clang__) before the usage of the clang diagnostic pragmas. The [-Wswitch] warning in src/future.cpp should be ignored. As the result, the equivalent GCC pragma is added. llvm-svn: 197314
* Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 ↵Howard Hinnant2013-09-141-0/+6
| | | | | | (invalid value for broken_promise). llvm-svn: 190756
* Fix a race in the construction of future. This fixes ↵Howard Hinnant2013-01-141-1/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14934. llvm-svn: 172456
* noexcept applied to <future>.Howard Hinnant2012-07-211-1/+1
| | | | llvm-svn: 160607
* Explicitly convert int to future_errc. Fixes ↵Howard Hinnant2012-02-021-1/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=11428 llvm-svn: 149630
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-2/+2
| | | | llvm-svn: 145624
* http://llvm.org/bugs/show_bug.cgi?id=10346Howard Hinnant2011-07-131-0/+22
| | | | llvm-svn: 135045
* provide ~future_error() definitionHoward Hinnant2011-07-081-0/+4
| | | | llvm-svn: 134663
* noexcept for <memory>. I've added a few extension noexcept to: ↵Howard Hinnant2011-05-281-1/+1
| | | | | | allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default| llvm-svn: 132261
* Applied noexcept to everything in [diagnostics] (Chapter 19)Howard Hinnant2011-05-261-2/+2
| | | | llvm-svn: 132137
* Implemented N3194Howard Hinnant2010-11-301-35/+0
| | | | llvm-svn: 120458
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Convert __thread_local_data to the singleton patternHoward Hinnant2010-10-141-2/+2
| | | | llvm-svn: 116500
* Fix whitespaceHoward Hinnant2010-09-041-1/+0
| | | | llvm-svn: 113089
* [futures.atomic_future] and notify_all_at_thread_exit. This completes the ↵Howard Hinnant2010-09-031-0/+35
| | | | | | header <future> and all of Chapter 30 (for C++0x enabled compilers). llvm-svn: 113017
* [futures.shared_future]Howard Hinnant2010-09-031-0/+17
| | | | llvm-svn: 112990
* [futures.task] and [futures.async]. Requires variadics and rvalue-ref support.Howard Hinnant2010-08-301-6/+29
| | | | llvm-svn: 112500
* future continues ...Howard Hinnant2010-08-271-0/+157
| | | | llvm-svn: 112284
* Getting started on <future>Howard Hinnant2010-08-251-0/+63
llvm-svn: 112061
OpenPOWER on IntegriCloud