Closed sgirones closed 7 months ago
The store.close() method is async so it can't be directly called from fn drop().
store.close()
fn drop()
This PR introduces a Store wrapper that handles the drop asynchronously.
There's the caveat that if the Store is dropped and then we immediately try to open it again, the original store may not be closed yet.
In order to overcome that, the user can explicitly close the store instead of relying on the drop.
The drop is mainly intended to handle the common scenario where the Store is dropped when the program exits.
Absolutely. This one in isolation gives no guarantees, we need something else.
Having this though allows for implicit graceful shutdown.
@arriqaaq is going to work on improved durability of write operations
The
store.close()
method is async so it can't be directly called fromfn drop()
.This PR introduces a Store wrapper that handles the drop asynchronously.
There's the caveat that if the Store is dropped and then we immediately try to open it again, the original store may not be closed yet.
In order to overcome that, the user can explicitly close the store instead of relying on the drop.
The drop is mainly intended to handle the common scenario where the Store is dropped when the program exits.