Simon Chen <simonche...@gmail.com> wrote:
> Another question is, if the c/c++ function takes 10 seconds to
> finish, when another process queries the exact entry being modified,
> what will be returned?

Either the old data, or the busy error - depending on whether your 
writing connection had to spill from in-memory cache to disk yet.

> Is it possible to lock
> this entry so that either the new value (when check passes) or old
> value (when check fails) will be returned AFTER the c function is
> done?

Open an exclusive transaction with BEGIN EXCLUSIVE. For more details, 
see http://sqlite.org/lockingv3.html

Igor Tandetnik



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

Reply via email to