← API Reference Class

asge::concurrent::EmptyContext final

An empty context that is never canceled.

#include <Context.hpp>

Inherits from asge::concurrent::_internal::IContext.

Inheritance

classDiagram
    class N1["asge::concurrent::EmptyContext"]
    class N2["asge::concurrent::_internal::IContext"]
    N2 <|-- N1
    click N1 href "classasge_1_1concurrent_1_1EmptyContext.html"
    click N2 href "structasge_1_1concurrent_1_1__internal_1_1IContext.html"

Collaboration

classDiagram
    class N1["asge::concurrent::EmptyContext"]
    class N2["asge::concurrent::_internal::IContext"]
    N2 <|-- N1
    click N1 href "classasge_1_1concurrent_1_1EmptyContext.html"
    click N2 href "structasge_1_1concurrent_1_1__internal_1_1IContext.html"

This is useful as top-level context for cancellable contexts.

Friends

#friend Backgroundprivate

Returns the root context of the context tree.

Background is never cancelled, has no deadline, and carries no values. It is intended as the top-level parent for all derived contexts and is the only context that has no parent itself.

The same instance is returned on every call.

Private Member Functions

#EmptyContext()=defaultprivate
#virtual void Cancel(ContextErr) overrideprivate
Overrides Cancel

Public Member Functions

#virtual bool Done() const noexcept
Overrides Done
#virtual void Wait() const
Overrides Wait
#virtual ContextErr Err() const noexcept
Overrides Err
#virtual void AddChild(pointer const &) noexcept
Overrides AddChild
#EmptyContext(EmptyContext const &)=default
#EmptyContext(EmptyContext &&)=default
#EmptyContext & operator=(EmptyContext const &)=default
#EmptyContext & operator=(EmptyContext &&)=default