YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
shared_contract.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include <utility>
8
9namespace yaclib {
10
11template <typename V, typename T>
12using SharedContract = std::pair<SharedFuture<V, T>, SharedPromise<V, T>>;
13
14template <typename V, typename T>
15using SharedContractOn = std::pair<SharedFutureOn<V, T>, SharedPromise<V, T>>;
16
17template <typename V = void, typename T = DefaultTrait>
24
25template <typename V = void, typename T = DefaultTrait>
34
35template <typename V = void, typename T = DefaultTrait>
41
42} // namespace yaclib
A intrusive pointer to objects with an embedded reference count.
constexpr std::size_t kSharedRefNoFuture
constexpr std::size_t kSharedRefWithFuture
Contract< V, T > MakeContract()
Creates related future and promise.
Definition contract.hpp:25
SharedPromise< V, T > MakeSharedPromise()
SharedContract< V, T > MakeSharedContract()
SharedContract< V, T > MakeSharedContractOn(IExecutor &e)
std::pair< SharedFutureOn< V, T >, SharedPromise< V, T > > SharedContractOn
std::pair< SharedFuture< V, T >, SharedPromise< V, T > > SharedContract