On Wednesday, 4 September, 2019 04:40, Peng Yu <pengyu...@gmail.com> wrote:

>The command line program `lockfile` locks based on files. I wants to do the
>same thing but based on a row in a table. For example (this is just one
>example feature, but all other features should also be preserved), if a
>given row is there, the process will hang unless some other process delete
>the given row. Multiple processes can compete for the same row. Because
>program like this should deal with concurrency, I am not clear how to make
>it bug free. Does anybody has a ready-to-use solution? Thanks.

Lockfile is a program that implements lockfiles for *nix shell scripts.  Why 
would you want to re-create that?  If you want to co-ordinate access to 
something between processes and/or threads in programs written in C then why 
not just use the OS provided named semaphore interface and skip all the extra 
complication (and let the OS do all the work, that’s why it was written)?

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to