Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
__callback is magic on msvc
  • Loading branch information
ericniebler committed Feb 10, 2026
commit 330342916db7af107ecb28e725591ae91809e2ab
14 changes: 7 additions & 7 deletions include/stdexec/__detail/__spawn_future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ namespace STDEXEC {
// responsibility.

const auto __rcvr = __sentinel;
auto __callback = __self->__callback_;
auto __cb = __self->__callback_;

// We have already synchronized with the consumer by performing a load-acquire above (and
// we know it was the *consumer* we synchronized with because __sentinel contains the address
Expand All @@ -572,7 +572,7 @@ namespace STDEXEC {
// __registered_receiver_; when the producer completes, it will load-acquire that value and
// clean up.
//
// In the second case, the producere will complete the registered receiver, which will have
// In the second case, the producer will complete the registered receiver, which will have
// the side effect of destroying the stop callback that we're running inside, which is a
// synchronization point with us.
//
Expand All @@ -582,12 +582,12 @@ namespace STDEXEC {
if (__sentinel == __rcvr) {
// __registered_receiver_ still contained the value we observed during the CAS, which means
// the producer still hadn't updated it to contain (__self). This means we succeeded in
// marking the operation as abandonded and the producer will destroy it when it completes
// marking the operation as abandoned and the producer will destroy it when it completes
// (which could happen at any moment); we need to complete the consumer with set_stopped. We
// invoke __callback (the copy of __callback_ that we put on the stack) with a null
// self-pointer to signal that it ought to invoke set_stopped(std::move(*__rcvr)) without
// touching the operation.
__callback(nullptr, __rcvr);
// invoke __cb (the copy of __callback_ that we put on the stack) with a null self-pointer
// to signal that it ought to invoke set_stopped(std::move(*__rcvr)) without touching the
// operation.
__cb(nullptr, __rcvr);
} else {
STDEXEC_ASSERT(__sentinel == __self);
// The producer beat us to the punch; it's busy trying to complete and is about to
Expand Down
Loading