Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want locks from the same user you'd use other mechanisms that file locks. File locks are for processes that don't have a lighter weight way to cooperate. (e.g. semaphores.)

Also, there's a reason that databases have processes dedicated to writing (e.g. Postgres writer process, Oracle dbwr)

Fun fact - IBM's MVS didn't have file locks.



there's a reason that databases have processes dedicated to writing

That's going to be a little tricky in an embedded db.


Sure, but you could still make sure writes are done in a mutex?


Don't forget that it still needs to synchronize across process boundaries, too - two processes, both running SQLite, and both accessing the same database file, is a supported scenario.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: