|
YACLib
C++ library for concurrent tasks execution
|
#include <result_core.hpp>
Public Types | |
| using | Value = V |
| using | Error = E |
Public Types inherited from yaclib::detail::BaseCore | |
| enum | State : std::uintptr_t { kEmpty = std::uintptr_t{0} , kResult = std::numeric_limits<std::uintptr_t>::max() } |
Public Member Functions | |
| ResultCore () noexcept | |
| template<typename... Args> | |
| ResultCore (Args &&... args) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Args &&... >) | |
| ~ResultCore () noexcept override | |
| template<typename... Args> | |
| void | Store (Args &&... args) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Args &&... >) |
| Result< V, E > & | Get () noexcept |
| template<bool Condition> | |
| decltype(auto) | MoveOrConst () |
| virtual Result< V, E > | Retire ()=0 |
Public Member Functions inherited from yaclib::detail::BaseCore | |
| bool | Empty () const noexcept |
| template<bool Shared> | |
| void | TransferExecutorTo (BaseCore &callback) noexcept |
Public Member Functions inherited from yaclib::detail::InlineCore | |
| virtual InlineCore * | Here (InlineCore &caller) noexcept=0 |
Public Member Functions inherited from yaclib::Job | |
| virtual void | Drop () noexcept |
Public Member Functions inherited from yaclib::IFunc | |
| virtual void | Call () noexcept |
Public Member Functions inherited from yaclib::IRef | |
| virtual void | IncRef () noexcept |
| Increments reference counter. | |
| virtual void | DecRef () noexcept |
| Decrements reference counter. | |
| virtual std::size_t | GetRef () noexcept |
| virtual | ~IRef () noexcept=default |
Public Attributes | ||
| union { | ||
| Result< V, E > _result | ||
| Callback _self | ||
| }; | ||
Public Attributes inherited from yaclib::detail::BaseCore | ||
| IExecutorPtr | _executor {NoRefTag{}, &MakeInline()} | |
Public Attributes inherited from yaclib::detail::Node | ||
| Node * | next = nullptr | |
Protected Member Functions | |
| template<bool SymmetricTransfer, bool Shared> | |
| YACLIB_INLINE auto | Impl (InlineCore &caller) noexcept |
Protected Member Functions inherited from yaclib::detail::BaseCore | |
| BaseCore (State state) noexcept | |
| void | StoreCallbackImpl (InlineCore &callback) noexcept |
| template<bool Shared> | |
| bool | SetCallbackImpl (InlineCore &callback) noexcept |
| bool | ResetImpl () noexcept |
| template<bool SymmetricTransfer, bool Shared> | |
| Transfer< SymmetricTransfer > | SetInlineImpl (InlineCore &callback) noexcept |
| template<bool SymmetricTransfer, bool Shared> | |
| Transfer< SymmetricTransfer > | SetResultImpl () noexcept |
Additional Inherited Members | |
Protected Attributes inherited from yaclib::detail::BaseCore | |
| yaclib_std::atomic_uintptr_t | _callback |
Definition at line 17 of file result_core.hpp.
Definition at line 20 of file result_core.hpp.
Definition at line 19 of file result_core.hpp.
|
inlinenoexcept |
Definition at line 22 of file result_core.hpp.
References yaclib::detail::BaseCore::kEmpty.
|
inlineexplicitnoexcept |
Definition at line 26 of file result_core.hpp.
|
inlineoverridenoexcept |
Definition at line 30 of file result_core.hpp.
References yaclib::detail::BaseCore::_callback, yaclib::detail::ResultCore< V, E >::_result, yaclib::detail::BaseCore::kResult, yaclib::MakeContract(), and YACLIB_ASSERT.
|
inlinenoexcept |
Definition at line 40 of file result_core.hpp.
References yaclib::detail::ResultCore< V, E >::_result.
Referenced by yaclib::detail::ResultCore< V, E >::Impl(), yaclib::detail::ResultCore< V, E >::MoveOrConst(), yaclib::detail::SharedCore< V, E >::Retire(), and yaclib::detail::UniqueCore< V, E >::Retire().
|
inlineprotectednoexcept |
Definition at line 62 of file result_core.hpp.
References yaclib::DownCast(), yaclib::detail::ResultCore< V, E >::Get(), yaclib::MakeContract(), yaclib::detail::ResultCore< V, E >::Store(), and YACLIB_PURE_VIRTUAL.
|
inline |
Definition at line 45 of file result_core.hpp.
References yaclib::detail::ResultCore< V, E >::Get(), and yaclib::MakeContract().
|
pure virtual |
Implemented in yaclib::detail::SharedCore< V, E >, and yaclib::detail::UniqueCore< V, E >.
|
inlinenoexcept |
Definition at line 36 of file result_core.hpp.
References yaclib::detail::ResultCore< V, E >::_result, and yaclib::MakeContract().
Referenced by yaclib::detail::ReadyCore< V, E >::Drop(), yaclib::detail::ResultCore< V, E >::Impl(), and yaclib::detail::ReadyCore< V, E >::ReadyCore().
| union { ... } yaclib::detail::ResultCore< V, E > |
Definition at line 56 of file result_core.hpp.
Referenced by yaclib::detail::ReadyCore< V, E >::Drop(), yaclib::detail::ResultCore< V, E >::Get(), yaclib::detail::ResultCore< V, E >::Store(), and yaclib::detail::ResultCore< V, E >::~ResultCore().
Definition at line 57 of file result_core.hpp.