diff --git a/blockstore.cpp b/blockstore.cpp index dbbfde630..e2734352c 100644 --- a/blockstore.cpp +++ b/blockstore.cpp @@ -194,6 +194,11 @@ void blockstore::loop() } } +bool blockstore::stop() +{ + return false; +} + void blockstore::check_wait(blockstore_operation *op) { if (op->wait_for == WAIT_SQE) diff --git a/blockstore.h b/blockstore.h index 34917e30c..ea1bd628c 100644 --- a/blockstore.h +++ b/blockstore.h @@ -311,6 +311,11 @@ public: void handle_event(ring_data_t* data); void loop(); + // Returns true when it's safe to destroy the instance. If destroying the instance + // requires to purge some queues, starts that process. Should be called in the event + // loop until it returns true. + bool stop(); + // Submission int enqueue_op(blockstore_operation *op); };