curiosity-ai / rocksdb-sharp

.net bindings for the rocksdb by facebook
BSD 2-Clause "Simplified" License
163 stars 41 forks source link

Question : CancelAllBackgroundWork #50

Closed gm0124816 closed 9 months ago

gm0124816 commented 9 months ago

Hi,

Nice work so far, love the speed of Rocksdb from within C# ! Just one question. I did not find a "Close" method and for sure no "CancelAllBackgroundWork" method.

Are these handled automatically in the background ?

Cheers, Geert

theolivenbaum commented 9 months ago

Hi @gm0124816

To close the DB, just call Dispose() on it:

var db = RocksDB.Open(...);
// your code
db.Dispose(); //Cancels all background work and closes the database