File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ namespace stdexec {
6767 };
6868
6969 static constexpr auto get_completion_signatures =
70- []<class _Self , class ... _Env>(_Self&&, _Env&&...) noexcept
71- -> __completion_signatures_of_t <
72- __child_of<_Self>,
73- __meval<__join_env_t , const __decay_t <__data_of<_Self>>&, _Env...>
74- > {
70+ []<class _Self , class ... _Env>(_Self &&, _Env &&...) noexcept
71+ -> __completion_signatures_of_t <
72+ __child_of<_Self>,
73+ __meval<__join_env_t , const __decay_t <__data_of<_Self>> &,
74+ _Env>... > {
7575 static_assert (sender_expr_for<_Self, write_env_t >);
7676 return {};
7777 };
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ namespace {
3737 // This is a work-around for clang-12 bugs in Release mode
3838 thread_local int __thread_id = 0 ;
3939
40+ static_assert (stdexec::sender<exec::task<void >>);
41+
4042 // This is a work-around for apple clang bugs in Release mode
4143 STDEXEC_WHEN (STDEXEC_APPLE_CLANG(), [[clang::optnone]]) auto get_id () -> int {
4244 return __thread_id;
@@ -257,6 +259,17 @@ namespace {
257259 CHECK (count == 3 );
258260 }
259261
262+ TEST_CASE (" task - can co_await task wrapped in write_env" , " [types][task]" ) {
263+ stdexec::sync_wait ([]() -> exec::task<void > {
264+ co_await stdexec::write_env (
265+ []() -> exec::task<void > {
266+ auto token = co_await stdexec::get_stop_token ();
267+ assert (!token.stop_possible ());
268+ }(),
269+ stdexec::prop{stdexec::get_stop_token, stdexec::never_stop_token{}});
270+ }());
271+ }
272+
260273 struct test_domain {
261274 template <sender_expr_for<then_t > _Sender>
262275 static constexpr auto transform_sender (_Sender&&) noexcept {
You can’t perform that action at this time.
0 commit comments