Skip to content

Commit 4c3e170

Browse files
committed
Fixed conditon on remove token reference.
1 parent 3e1908f commit 4c3e170

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/stop_token.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct __stop_state {
5353
void __remove_token_reference() noexcept {
5454
auto __oldState =
5555
__state_.fetch_sub(__token_ref_increment, std::memory_order_acq_rel);
56-
if (__oldState < (__token_ref_increment + __token_ref_increment)) {
56+
if (__oldState < (__token_ref_increment + __source_ref_increment)) {
5757
delete this;
5858
}
5959
}

0 commit comments

Comments
 (0)