From 892dea0fb7b755dd78d27ac863a823db6bf1d2be Mon Sep 17 00:00:00 2001 From: pavel-mukhanov Date: Tue, 9 Jul 2019 12:49:03 +0300 Subject: [PATCH] Add changelog and comment. --- CHANGELOG.md | 6 ++++++ src/db.rs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 117b034..be588ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.12.3 + +### Changes + +* Added `Sync` and `Send` implementations to `Snapshot` (pavel-mukhanov) + ## 0.12.2 (2019-05-03) ### Changes diff --git a/src/db.rs b/src/db.rs index c799b01..c59a871 100644 --- a/src/db.rs +++ b/src/db.rs @@ -104,6 +104,8 @@ pub struct Snapshot<'a> { inner: *const ffi::rocksdb_snapshot_t, } +/// `Send` and `Sync` implementations for `Snapshot` are safe, because `Snapshot` is +/// immutable and can be safely shared between threads. unsafe impl<'a> Send for Snapshot<'a> {} unsafe impl<'a> Sync for Snapshot<'a> {}