Changeset 5ea9dd2 in mainline for uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
- Timestamp:
- 2019-07-02T11:17:14Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d71d09
- Parents:
- 09170ab8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
r09170ab8 r5ea9dd2 32 32 #include <__bits/exception.hpp> 33 33 #include <__bits/functional/function.hpp> 34 #include <__bits/memory/allocator_traits.hpp> 34 35 #include <__bits/thread/future.hpp> 35 36 #include <__bits/thread/future_common.hpp> … … 74 75 > 75 76 explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f) 76 : packaged_task{forward<F>(f)} 77 { 78 // TODO: use the allocator 77 : func_{forward<F>(f)}, state_{} 78 { 79 auto rebound = allocator_traits<Allocator>::rebind< 80 aux::shared_state<R> 81 >{a}; 82 83 state_ = rebound.allocate(1); 84 rebound.construct(state_); 79 85 } 80 86
Note:
See TracChangeset
for help on using the changeset viewer.