File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,12 @@ struct ReadHandleImpl {
392
392
}
393
393
}
394
394
395
+ protected:
396
+ friend class ReadHandleImpl ;
397
+ // Method used only by ReadHandleImpl ctor
398
+ void discard () {
399
+ it_.store (nullptr , std::memory_order_relaxed);
400
+ }
395
401
private:
396
402
// we are waiting on Item* to be set to a value. One of the valid values is
397
403
// nullptr. So choose something that we dont expect to indicate a ptr
@@ -475,6 +481,7 @@ struct ReadHandleImpl {
475
481
if (it_ && it_->isIncomplete ()) {
476
482
waitContext_ = std::make_shared<ItemWaitContext>(alloc);
477
483
if (!alloc_->addWaitContextForMovingItem (it->getKey (), waitContext_)) {
484
+ waitContext_->discard ();
478
485
waitContext_.reset ();
479
486
}
480
487
}
You can’t perform that action at this time.
0 commit comments