MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / nested_value_fail

Function nested_value_fail

include/exec/sequence/merge_each.hpp:437–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435 complete_if_none_active();
436 }
437 bool nested_value_fail() noexcept override
438 {
439 switch (__completion_.exchange(__completion_t::__error))
440 {
441 case __completion_t::__started:
442 // We must request stop. When the previous state is __error or __stopped, then stop has
443 // already been requested.
444 __nested_stop_.request_stop();
445 [[fallthrough]];
446 case __completion_t::__stopped:
447 // We are the first child to complete with an error, so we must save the error. (Any
448 // subsequent errors are ignored.)
449 return true;
450 break;
451 case __completion_t::__error:; // We're already in the "error" state. Ignore the error.
452 }
453 return false;
454 }
455 void nested_value_break() noexcept override
456 {
457 set_break();

Callers

nothing calls this directly

Calls 2

exchangeMethod · 0.80
request_stopMethod · 0.45

Tested by

no test coverage detected