nostrdb-rs

nostrdb in rust!
git clone git://jb55.com/nostrdb-rs
Log | Files | Refs | Submodules | README | LICENSE

commit b04388bfe521bd74e01a10916407562d920ccc23
parent c301c61990df5f4517a1d4fce21fb95d67fc0186
Author: William Casarin <jb55@jb55.com>
Date:   Mon,  9 Dec 2024 16:38:33 -0800

Make underlying ndb threadsafe

We update nostrdb so that the Send and Sync traits are a giant lie

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/ndb.rs | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ndb.rs b/src/ndb.rs @@ -22,9 +22,10 @@ struct NdbRef { rust_cb_ctx: *mut ::std::os::raw::c_void, } -/// It's safe to have multi-threaded references to this because thread safety -/// is guaranteed by LMDB +/// SAFETY: thread safety is ensured by nostrdb unsafe impl Send for NdbRef {} + +/// SAFETY: thread safety is ensured by nostrdb unsafe impl Sync for NdbRef {} /// The database is automatically closed when [Ndb] is [Drop]ped.