worldcoin / semaphore-rs

🦀 Rust support library for semaphore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`new_with_initial_values` and `attempt_restore` are unsafe

Dzejkop opened this issue · comments

Not a big concern, since we never have other processes using the mmapped file, but the safety requirements of MmapOptions::with_file demand that we have exclusive mutable access to the file.

We should add file locking using a crate like fd-lock