YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::detail::BaseCore Class Reference

#include <base_core.hpp>

Inheritance diagram for yaclib::detail::BaseCore:
[legend]
Collaboration diagram for yaclib::detail::BaseCore:
[legend]

Public Types

enum  State : std::uintptr_t { kEmpty = std::uintptr_t{0} , kResult = std::numeric_limits<std::uintptr_t>::max() }
 
template<bool SymmetricTransfer>
using Transfer = InlineCore *
 

Public Member Functions

void StoreCallback (InlineCore &callback) noexcept
 
bool Empty () const noexcept
 
bool SetCallback (InlineCore &callback) noexcept
 
bool Reset () noexcept
 
void CallInline (InlineCore &callback) noexcept
 
template<bool SymmetricTransfer>
Transfer< SymmetricTransferSetInline (InlineCore &callback) noexcept
 
template<bool SymmetricTransfer>
Transfer< SymmetricTransferSetResult () noexcept
 
void MoveExecutorTo (BaseCore &callback) noexcept
 
- Public Member Functions inherited from yaclib::detail::InlineCore
virtual InlineCoreHere (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 ~IRef () noexcept=default
 

Public Attributes

IExecutorPtr _executor {NoRefTag{}, &MakeInline()}
 
- Public Attributes inherited from yaclib::detail::Node
Nodenext = nullptr
 

Protected Member Functions

 BaseCore (State callback) noexcept
 

Protected Attributes

yaclib_std::atomic_uintptr_t _callback
 

Detailed Description

Definition at line 20 of file base_core.hpp.

Member Typedef Documentation

◆ Transfer

template<bool SymmetricTransfer>
using yaclib::detail::BaseCore::Transfer = InlineCore*

Definition at line 42 of file base_core.hpp.

Member Enumeration Documentation

◆ State

Enumerator
kEmpty 
kResult 

Definition at line 22 of file base_core.hpp.

Constructor & Destructor Documentation

◆ BaseCore()

yaclib::detail::BaseCore::BaseCore ( BaseCore::State  callback)
explicitprotectednoexcept

Definition at line 60 of file base_core.cpp.

References yaclib::MakeContract().

Member Function Documentation

◆ CallInline()

void yaclib::detail::BaseCore::CallInline ( InlineCore callback)
noexcept

◆ Empty()

bool yaclib::detail::BaseCore::Empty ( ) const
noexcept

Definition at line 13 of file base_core.cpp.

References _callback, kEmpty, kResult, yaclib::MakeContract(), and YACLIB_DEBUG.

◆ MoveExecutorTo()

void yaclib::detail::BaseCore::MoveExecutorTo ( BaseCore callback)
noexcept

Definition at line 63 of file base_core.cpp.

References yaclib::MakeContract(), and YACLIB_ASSERT.

◆ Reset()

bool yaclib::detail::BaseCore::Reset ( )
noexcept

Definition at line 28 of file base_core.cpp.

References _callback, kEmpty, kResult, and yaclib::MakeContract().

◆ SetCallback()

bool yaclib::detail::BaseCore::SetCallback ( InlineCore callback)
noexcept

Definition at line 19 of file base_core.cpp.

References yaclib::MakeContract(), and YACLIB_ASSERT.

◆ SetInline()

template<bool SymmetricTransfer>
template BaseCore::Transfer< false > yaclib::detail::BaseCore::SetInline< false > ( InlineCore callback)
noexcept

Definition at line 41 of file base_core.cpp.

References yaclib::MakeContract(), and yaclib::detail::SetCallback().

Referenced by yaclib::detail::SetCallback().

◆ SetResult()

template<bool SymmetricTransfer>
template BaseCore::Transfer< false > yaclib::detail::BaseCore::SetResult< false > ( )
noexcept

Definition at line 49 of file base_core.cpp.

References _callback, kEmpty, kResult, yaclib::MakeContract(), and YACLIB_ASSERT.

◆ StoreCallback()

void yaclib::detail::BaseCore::StoreCallback ( InlineCore callback)
noexcept

Definition at line 8 of file base_core.cpp.

References yaclib::MakeContract().

Referenced by yaclib::detail::SetCallback().

Member Data Documentation

◆ _callback

yaclib_std::atomic_uintptr_t yaclib::detail::BaseCore::_callback
protected

Definition at line 61 of file base_core.hpp.

Referenced by Empty(), Reset(), and SetResult().

◆ _executor


The documentation for this class was generated from the following files: