diff --git a/tests/ReuseFutureTest.cpp b/tests/ReuseFutureTest.cpp index 7bc930c8885ee7872a2f323fa60a23a3b4bd9472..50f01ad73b2608245e0e8e4f863a9353ae6a85f0 100644 --- a/tests/ReuseFutureTest.cpp +++ b/tests/ReuseFutureTest.cpp @@ -38,8 +38,10 @@ void emperTest() { DIE_MSG_ERRNO("read failed"); } - // reset the BPS used to signal the completion of this future - read_future.reset(); + if (i != ITERATIONS - 1) { + // reset the BPS used to signal the completion of this future + read_future.reset(); + } } }, cps); @@ -53,8 +55,10 @@ void emperTest() { DIE_MSG_ERRNO("write failed"); } - // reset the BPS used to signal the completion of this future - write_future.reset(); + if (i != ITERATIONS - 1) { + // reset the BPS used to signal the completion of this future + write_future.reset(); + } } }, cps);