brunoczim / fslock

File locking for Rust.
MIT License
40 stars 11 forks source link

Make `OsString` `Send` #12

Closed adumbidiot closed 2 years ago

adumbidiot commented 2 years ago

I made a simple wrapper around a lockfile to run everything using tokio's blocking threadpool, but I needed to make OsString Send so that I can send the path to the threadpool when opening a lockfile. I didn't see any behaviors in each platform's OsString type that would make it not Send. The alternative to this PR would be forcing the use of another buffer type like PathBuf, but I feel like manually implementing Send is the cleaner solution.