Skip to content

Fix just_from submit exception specification - #2212

Merged
ericniebler merged 2 commits into
NVIDIA:mainfrom
fallintoplace:fix/just-from-submit-noexcept
Aug 18, 2026
Merged

Fix just_from submit exception specification#2212
ericniebler merged 2 commits into
NVIDIA:mainfrom
fallintoplace:fix/just-from-submit-noexcept

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

  • Make both just_from::submit() overloads conditionally noexcept.
  • Add coverage for a callable that throws while being moved during submit().

Why

submit() calls connect(), but both overloads were unconditionally noexcept. A throwing callable move could therefore terminate instead of propagating the exception.

Testing

  • build/test/exec/test.exec [just_from]
  • ctest --test-dir build --output-on-failure -j 8

All 953 configured tests passed.

@copy-pr-bot

copy-pr-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread include/exec/just_from.hpp Outdated
template <class Rcvr>
STDEXEC_ATTRIBUTE(host, device)
auto submit(Rcvr rcvr) && noexcept -> void
auto submit(Rcvr rcvr) && noexcept(STDEXEC::__nothrow_decay_copyable<Rcvr, Fn>) -> void

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receivers are now required to be nothrow move constructible, so this check is unnecessary.

Suggested change
auto submit(Rcvr rcvr) && noexcept(STDEXEC::__nothrow_decay_copyable<Rcvr, Fn>) -> void
auto submit(Rcvr rcvr) && noexcept(STDEXEC::__nothrow_decay_copyable<Fn>) -> void

Comment thread include/exec/just_from.hpp Outdated
template <class Rcvr>
STDEXEC_ATTRIBUTE(host, device)
auto submit(Rcvr rcvr) const & noexcept -> void
auto submit(Rcvr rcvr) const & noexcept(STDEXEC::__nothrow_decay_copyable<Rcvr, Fn const &>)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto submit(Rcvr rcvr) const & noexcept(STDEXEC::__nothrow_decay_copyable<Rcvr, Fn const &>)
auto submit(Rcvr rcvr) const & noexcept(STDEXEC::__nothrow_decay_copyable<Fn const &>)

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 5742a1f

@ericniebler
ericniebler merged commit 69807b4 into NVIDIA:main Aug 18, 2026
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants