48 template<
typename Alloc>
51 [[no_unique_address]] Alloc
alloc;
56 template<
typename Env = EmptyEnv>
74 template<
typename Alloc>
77 template<
typename Alloc,
typename E = EmptyEnv>
80 template<
typename Alloc,
typename Rec>
88 template<
typename Alloc,
typename Rec>
91 template<
typename Alloc,
typename Rec>
101 auto base() const& -> Rec const& {
return m_data->receiver; }
102 auto base() && -> Rec&& {
return util::move(m_data->receiver); }
105 template<
typename... Vs>
107 m_data->data->complete_one();
113 m_data->data->complete_one();
118 m_data->data->complete_one();
128 template<
typename Alloc,
typename Rec>
131 template<
typename Alloc,
typename Send,
typename Rec>
138 : m_data(
data,
util::move(receiver))
143 self.m_data.data->start_one();
152 template<
typename Alloc,
typename Send,
typename Rec>
155 template<
typename Alloc,
typename Send>
164 template<concepts::RemoveCVRefSameAs<Type> Self,
typename E>
170 template<concepts::RemoveCVRefSameAs<Type> Self,
typename Rec>
182 template<
typename Alloc,
typename Send>
185 template<
typename Alloc>
192 template<
typename Op,
typename Data>
207 template<
typename Op,
typename Data>
210 template<
typename Alloc,
typename Rec>
217 : m_scope(scope), m_receiver(
util::move(receiver)) {}
221 data->did_complete = [
this] {
224 data->complete_one();
242 [[no_unique_address]] Rec m_receiver;
247 template<
typename Alloc,
typename Rec>
250 template<
typename Alloc>
262 template<
typename Rec>
275 template<
typename Alloc>
278 template<
typename Alloc>
284 template<concepts::SenderIn<Env<Alloc>> Send>
296 template<
typename Alloc>
320template<concepts::Allocator Alloc = platform::DefaultAllocator>
Definition function.h:365
Definition in_place_stop_source.h:11
auto get_stop_token() const -> InPlaceStopToken
Definition in_place_stop_token.h:31
Definition defer_construct.h:8
Definition reference_wrapper.h:14
Definition optional_forward_declaration.h:5
#define DI_IMMOVABLE_NO_UNIQUE_ADDRESS
Definition compiler.h:15
Definition receiver_of.h:25
Definition sequence_sender.h:128
A type which models an async scope.
Definition scope.h:180
Definition counting_scope.h:47
meta::Type< DataT< Alloc > > Data
Definition counting_scope.h:75
decltype(util::declval< Data< Alloc > const & >().get_env(util::declval< E const & >())) Env
Definition counting_scope.h:78
meta::Type< RunReceiverT< Op, Data > > RunReceiver
Definition counting_scope.h:208
meta::Type< NestOperationStateT< Alloc, Send, Rec > > NestOperationState
Definition counting_scope.h:153
meta::Type< RunSequenceT< Alloc > > RunSequence
Definition counting_scope.h:276
meta::Type< RunOperationT< Alloc, Rec > > RunOperation
Definition counting_scope.h:248
meta::Type< NestSenderT< Alloc, meta::RemoveCVRef< Send > > > NestSender
Definition counting_scope.h:183
meta::Type< NestReceiverT< Alloc, Rec > > NestReceiver
Definition counting_scope.h:129
meta::Type< NestDataT< Alloc, Rec > > NestData
Definition counting_scope.h:89
constexpr auto set_error
Definition set_error.h:14
constexpr auto set_next
Set the next sender of a sequence.
Definition sequence_sender.h:77
constexpr auto start
Definition start.h:20
meta::Type< counting_scope_ns::CountingScopeT< Alloc > > CountingScope
A scope that waits for all spawned senders to complete.
Definition counting_scope.h:321
constexpr auto make_env
Create an environment with overrides for queries.
Definition make_env.h:147
meta::Type< receiver_interface_ns::ReceiverAdaptor< Self, Base > > ReceiverAdaptor
Definition receiver_adaptor.h:236
constexpr auto set_stopped
Definition set_stopped.h:14
constexpr auto get_sequence_cardinality
A query that returns the cardinality of a sequence.
Definition get_sequence_cardinality.h:45
constexpr auto with
Specify an override for an environment query.
Definition make_env.h:112
constexpr auto get_stop_token
Definition get_stop_token.h:25
constexpr auto get_env
Definition get_env.h:27
constexpr auto get_allocator
Definition get_allocator.h:27
constexpr auto connect
Definition connect.h:42
constexpr auto set_value
Definition set_value.h:14
constexpr auto just
Definition just.h:86
@ Relaxed
Definition memory_order.h:7
@ AcquireRelease
Definition memory_order.h:11
di::meta::Decay< decltype(T)> Tag
Definition tag_invoke.h:28
auto declval() -> meta::AddRValueReference< T >
Definition declval.h:8
constexpr auto forward_like(U &&value) -> decltype(auto)
Definition forward_like.h:8
Definition zstring_parser.h:9
constexpr auto c_
A value of type Constexpr<val>.
Definition constexpr.h:252
constexpr auto data
Definition data.h:51
Defines the sequence sender concepts and related CPOs.
Definition sequence_sender.h:86
Definition set_stopped.h:6
Definition counting_scope.h:186
static auto get_data(Type &) -> Data< Alloc > *
Definition counting_scope.h:297
auto data() -> Data< Alloc > *
Definition counting_scope.h:281
friend auto tag_invoke(Tag< nest >, Type &self, Send &&sender)
Definition counting_scope.h:285
friend auto tag_invoke(Tag< run >, Type &self)
Definition counting_scope.h:289
friend auto tag_invoke(Tag< get_env >, Type const &self)
Definition counting_scope.h:291
Definition counting_scope.h:50
void start_one()
Definition counting_scope.h:61
sync::InPlaceStopSource stop_source
Definition counting_scope.h:52
sync::Atomic< usize > count
Definition counting_scope.h:53
void complete_one()
Definition counting_scope.h:63
Alloc alloc
Definition counting_scope.h:51
auto get_env(Env const &env={}) const
Definition counting_scope.h:57
function::Function< void()> did_complete
Definition counting_scope.h:54
Definition counting_scope.h:49
Definition counting_scope.h:82
Data< Alloc > * data
Definition counting_scope.h:83
Rec receiver
Definition counting_scope.h:84
Definition counting_scope.h:81
friend void tag_invoke(Tag< start >, Type &self)
Definition counting_scope.h:142
Type(Data< Alloc > *data, Send &&sender, Rec receiver)
Definition counting_scope.h:137
meta::ConnectResult< Send, NestReceiver< Alloc, Rec > > Op
Definition counting_scope.h:135
Definition counting_scope.h:132
Type(NestData< Alloc, Rec > *data)
Definition counting_scope.h:99
auto base() &&-> Rec &&
Definition counting_scope.h:102
auto base() const &-> Rec const &
Definition counting_scope.h:101
Definition counting_scope.h:92
Definition counting_scope.h:157
void is_sender
Definition counting_scope.h:158
Send sender
Definition counting_scope.h:160
Data< Alloc > * data
Definition counting_scope.h:161
friend auto tag_invoke(Tag< connect >, Self &&self, Rec receiver)
Definition counting_scope.h:173
friend auto tag_invoke(Tag< get_completion_signatures >, Self &&, E &&) -> meta::CompletionSignaturesOf< meta::Like< Self, Send >, Env< Alloc, E > >
Definition counting_scope.h:165
friend auto tag_invoke(Tag< get_env >, Type const &self)
Definition counting_scope.h:178
Definition counting_scope.h:156
Type(util::ReferenceWrapper< Scope > scope, Rec receiver)
Definition counting_scope.h:216
void cleanup()
Definition counting_scope.h:219
friend void tag_invoke(Tag< start >, Type &self)
Definition counting_scope.h:232
Definition counting_scope.h:211
Definition counting_scope.h:194
Op * op
Definition counting_scope.h:197
Data * data
Definition counting_scope.h:198
friend void tag_invoke(Tag< set_stopped >, Type &&self)
Definition counting_scope.h:201
void is_receiver
Definition counting_scope.h:195
friend void tag_invoke(Tag< set_value >, Type &&self)
Definition counting_scope.h:200
friend auto tag_invoke(Tag< get_env >, Type const &self)
Definition counting_scope.h:203
Definition counting_scope.h:193
Definition counting_scope.h:252
util::ReferenceWrapper< Scope > scope
Definition counting_scope.h:257
SequenceTag is_sender
Definition counting_scope.h:255
friend auto tag_invoke(Tag< subscribe >, Type &&self, Rec receiver)
Definition counting_scope.h:264
di::CompletionSignatures< SetValue(util::ReferenceWrapper< Scope >), SetStopped()> CompletionSignatures
Definition counting_scope.h:259
friend auto tag_invoke(Tag< get_env >, Type const &self)
Definition counting_scope.h:268
Definition counting_scope.h:251
Definition completion_signuatures.h:7