kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Tests::Utils::Schedulers::Stopped Struct Reference

Scheduler that returns a sender that always completes on the stop channel. More...

#include <stopped.hpp>

Classes

struct  OpState
struct  Sender

Public Types

using scheduler_concept = stdexec::scheduler_tag

Public Member Functions

constexpr auto schedule () const noexcept -> Sender
template<stdexec::__one_of< stdexec::set_value_t, stdexec::set_stopped_t > Tag>
constexpr auto query (stdexec::get_completion_scheduler_t< Tag >) const noexcept -> Stopped

Friends

bool operator== (const Stopped &, const Stopped &) noexcept=default

Detailed Description

Scheduler that returns a sender that always completes on the stop channel.

The Stopped::Sender advertises both stdexec::set_stopped_t and stdexec::set_value_t, even though Stopped::OpState always starts on the stdexec::set_stopped_t channel. This is on purpose, to allow it to be connectable in stdexec::sync_wait. Therefore, it is not equivalent to stdexec::just_stopped.

Note
Inspired by https://github.com/NVIDIA/stdexec/blob/2184dd714f82df1e00d39961817be97f31c02744/test/test_common/schedulers.hpp#L389-L442.

Definition at line 22 of file stopped.hpp.

Member Typedef Documentation

◆ scheduler_concept

Definition at line 24 of file stopped.hpp.

Member Function Documentation

◆ query()

template<stdexec::__one_of< stdexec::set_value_t, stdexec::set_stopped_t > Tag>
auto Tests::Utils::Schedulers::Stopped::query ( stdexec::get_completion_scheduler_t< Tag > ) const -> Stopped
inlinenodiscardconstexprnoexcept

Definition at line 37 of file stopped.hpp.

◆ schedule()

auto Tests::Utils::Schedulers::Stopped::schedule ( ) const -> Sender
inlinenodiscardconstexprnoexcept

Definition at line 31 of file stopped.hpp.

◆ operator==

bool operator== ( const Stopped & ,
const Stopped &  )
friend

The documentation for this struct was generated from the following file:
  • /__w/kokkos-execution/kokkos-execution/tests/utils/schedulers/stopped.hpp