Skip to content

Commit

Permalink
Fixup documentation of the OPENED_ENV.
Browse files Browse the repository at this point in the history
Precise that Handle open the file.
  • Loading branch information
darnuria committed Jul 10, 2023
1 parent 3256a26 commit 653db80
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions heed/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ use crate::{

/// The list of opened environments, the value is an optional environment, it is None
/// when someone asks to close the environment, closing is a two-phase step, to make sure
/// noone tries to open the same environment between these two phases.
/// none tries to open the same environment between these two phases.
///
/// Trying to open a None marked environment returns an error to the user trying to open it.
/// Trying to open a `None` marked environment returns an error to the user trying to open it.
///
/// [samefile::Handle] abstract the platform details of checking if the given paths points to
/// [same_file::Handle] abstract the platform details of checking if the given paths points to
/// the same file on the filesystem.
///
/// ## Safety
///
/// Mind that Handle currently open the file, so avoid writing through the fd held by [same_file::Handle],
/// since the file will also be opened by LMDB.
static OPENED_ENV: Lazy<RwLock<HashMap<Handle, EnvEntry>>> = Lazy::new(RwLock::default);

struct EnvEntry {
Expand Down

0 comments on commit 653db80

Please sign in to comment.