From 2ae6e47c3f9f16577c9f5a5df5f0fdf6ab9a6ac2 Mon Sep 17 00:00:00 2001 From: alpha-tango-kilo Date: Mon, 6 Nov 2023 17:48:08 +0000 Subject: [PATCH] Phrasing/Typos --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 717d2b9..cf15477 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Crates.io](https://img.shields.io/crates/v/close_already.svg)](https://crates.io/crates/close_already) [![Dependencies](https://deps.rs/repo/codeberg/alpha-tango-kilo/close_already/status.svg)](https://deps.rs/repo/codeberg/alpha-tango-kilo/close_already) -**Closing files on Windows is slow, taking 1-10 milliseconds compared to microseconds (on MacOS, Linux, and friends).** +**Closing files on Windows is slow, taking 1-10 milliseconds compared to microseconds on MacOS, Linux, and friends.** The "why?" is explained in [this blog post](https://gregoryszorc.com/blog/2021/04/06/surprisingly-slow/) by Gregory Szorc, which also suggests using thread pools to handle the closing of file handles on Windows. This is exactly what this crate implements, while being as unintruisive to the developer as possible. While not using this crate specifically, there are case studies in both [rustup](https://github.com/rust-lang/rustup/pull/1850) and [Mercurial](https://repo.mercurial-scm.org/hg/rev/2fdbf22a1b63f7b4c94393dbf45ad417da257fe0) where this technique has massively improved performance diff --git a/src/lib.rs b/src/lib.rs index ce35c95..b18a654 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ use std::{ ops::{Deref, DerefMut}, }; -// cfg specification for having either std::os::windows(::io::Handle) or +// cfg specification for having either std::os::windows(::io::OwnedHandle) or // std::os::fd(::OwnedFd) #[cfg(not(any(windows, unix, target_os = "wasi")))] compile_error!(