15template <FailPolicy F,
typename OutputValue,
typename Trait,
typename InputCore>
20template <
typename OutputValue,
typename Trait,
typename InputCore>
37 output.reserve(_cores.size());
38 for (
auto* core : _cores) {
39 output.push_back(core->Retire());
41 std::move(_p).Set(std::move(
output));
45 std::vector<InputCore*> _cores;
49template <
typename OutputValue,
typename Trait,
typename InputCore>
66 if (!Trait::Ok(
result) && !_done.load(std::memory_order_relaxed) &&
67 !_done.exchange(
true, std::memory_order_acq_rel)) {
69 std::move(_p).Set(Trait::GetError(std::as_const(
result)));
76 result.reserve(_cores.size());
77 for (
auto* core : _cores) {
78 result.push_back(Trait::GetValue(core->Retire()));
80 std::move(_p).Set(std::move(
result));
82 for (
auto* core : _cores) {
89 std::vector<InputCore*> _cores;
atomic< bool > atomic_bool
Contract< V, T > MakeContract()
Creates related future and promise.
FailPolicy
This Policy describe how algorithm interpret if Future will be fulfilled by fail (exception or error)