File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,15 @@ namespace experimental::execution
117117 template <class _ParentPromise >
118118 constexpr explicit __default_task_context_impl (_ParentPromise& __parent) noexcept
119119 {
120- if constexpr (__with_affinity && __parent_promise_has_start_scheduler<_ParentPromise>() )
120+ if constexpr (__with_affinity)
121121 {
122- // get_start_scheduler is used here to get the parent's "current" scheduler,
123- // which is the one on which this task has been started (i.e., co_await-ed).
124- auto __parent_sched = get_start_scheduler (get_env (__parent));
125- this ->__scheduler_ = __parent_sched;
122+ if constexpr (__parent_promise_has_start_scheduler<_ParentPromise>())
123+ {
124+ // get_start_scheduler is used here to get the parent's "current" scheduler,
125+ // which is the one on which this task has been started (i.e., co_await-ed).
126+ auto __parent_sched = get_start_scheduler (get_env (__parent));
127+ this ->__scheduler_ = __parent_sched;
128+ }
126129 }
127130 }
128131
You can’t perform that action at this time.
0 commit comments