Skip to content

Commit

Permalink
fix a few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler committed Mar 20, 2024
1 parent 49f7835 commit d79d8da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions execution.bs
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,15 @@ struct recv_op : operation_base {
// May be completing concurrently on another thread already.
if (stopPossible) {
// Register the stop callback
stopCallback.emplace(std::move(st), cancel_cb{self});
stopCallback.emplace(std::move(st), cancel_cb{*this});

// Mark as 'completed'
if (ready.load(std::memory_order_acquire) ||
ready.exchange(true, std::memory_order_acq_rel)) {
// Already completed on another thread
stopCallback.reset();

BOOL ok = WSAGetOverlappedResult(sock, (WSAOVERLAPPED*)&self, &bytesTransferred, FALSE, &flags);
BOOL ok = WSAGetOverlappedResult(sock, (WSAOVERLAPPED*)this, &bytesTransferred, FALSE, &flags);
if (ok) {
std::execution::set_value(std::move(receiver), bytesTransferred);
} else {
Expand Down Expand Up @@ -695,7 +695,7 @@ struct _then_sender {
}

decltype(auto) get_env() const noexcept {
return get_env(self.s_);
return get_env(s_);
}
};

Expand Down

0 comments on commit d79d8da

Please sign in to comment.