Add DB::cancel_all_background_work method (#459)

master
Stanislav Tkach 4 years ago committed by GitHub
parent b91299ca2e
commit 00abac7504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 7
      src/db.rs

@ -2,6 +2,8 @@
## [Unreleased] ## [Unreleased]
* Add `DB::cancel_all_background_work` method (stanislav-tkach)
## 0.15.0 (2020-08-25) ## 0.15.0 (2020-08-25)
* Fix building rocksdb library on windows host (aleksuss) * Fix building rocksdb library on windows host (aleksuss)

@ -1361,6 +1361,13 @@ impl DB {
Ok(()) Ok(())
} }
} }
/// Request stopping background work, if wait is true wait until it's done.
pub fn cancel_all_background_work(&self, wait: bool) {
unsafe {
ffi::rocksdb_cancel_all_background_work(self.inner, wait as u8);
}
}
} }
impl Drop for DB { impl Drop for DB {

Loading…
Cancel
Save