What Keith said, plus, SQLite does not do row locking, period. It's a full file lock when required. SQLite has some embedded functionality to deal with locking things like this, and your program will need to be written to be aware of how to deal with locking.
If you're attempting to fix race conditions, then you need to look at how your programs are working with each other, either by communicating with each other through FIFO files (If linux) or through DDE (Dynamic Data Exchange) if Windows, or rely on the OS and SQLite provisions already out there. I've done some LIGHT work with DDE back in the Delphi 5 days, and from what I remember, it was pretty interesting. Work with the tools you have, and don't go reinvent the wheel. (Unless the purpose is to reinvent the wheel just for fun.) On Wed, Sep 4, 2019 at 6:40 AM 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. > -- > Regards, > Peng > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users