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

Function __detach

include/exec/detail/shared.hpp:416–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414 }
415
416 constexpr void __detach() noexcept
417 {
418 // increments the use count:
419 auto __started_ptr = __started_ref_.load();
420 // If the use count is 3 (one for *this, one for __started_ref_, and one for
421 // __started_ptr), then we are the final "consumer". Ask the operation to stop
422 // early.
423 if (3 == __started_ptr.use_count())
424 {
425 this->__stop_source_.request_stop();
426 }
427 }
428
429 constexpr virtual void __set_completed() noexcept final
430 {

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
request_stopMethod · 0.45

Tested by

no test coverage detected