Skip to content

Commit

Permalink
Let's figure out windows warts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Jan 7, 2025
1 parent 7fd75dd commit 4eeecee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct Handle {

impl Drop for Handle {
fn drop(&mut self) {
println!("Released lock on {:?}", std::thread::current().id());
unlock(&self.file);
}
}
Expand All @@ -94,6 +95,7 @@ fn lock_file(mut path: PathBuf) -> Result<Handle, ApiError> {
if res != 0 {
Err(ApiError::LockAcquisition(path))
} else {
println!("Acquired lock on {:?}", std::thread::current().id());
Ok(Handle { file })
}
}
Expand Down

0 comments on commit 4eeecee

Please sign in to comment.